473,395 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

mod_proxy_html and Apache 2.2.29: parse all <meta http-equiv="" content="">

I'm using Mamp 3 (pro) on Mac OS X Yosemite 10.10; I'v already compiled and installed mod_proxy_html (3.1.2) and mod_xml2enc, they are both correctly loaded by Apache 2.2.29 without issues.

This is my typical html file:

Expand|Select|Wrap|Line Numbers
  1.     <!DOCTYPE HTML>
  2.     <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5.         <meta http-equiv="Authorization" content="Bearer dummyToken">
  6.         <title>Header Test</title>
  7.     </head>
  8.     <body>
  9.  
  10.     </body>
I need to convert all the <meta http-equiv="some" content="thing"> to real http headers. I've already known how to do this via ajax, it's not a problem. But I need to add an oauth token, inside the Authorization header field, to get access to various protected resources, like images or video streams, that are not served through ajax but referenced, through an url, directly inside the html.

So, directly inside my httpd.conf I have:

Expand|Select|Wrap|Line Numbers
  1.     ProxyHTMLEnable On
  2.     ProxyHTMLMeta On
this config should globally apply to apache. At the moment my server replies with all the field contained inside the request: it seems that the ProxyHTMLMeta On is ignored and all the meta tags are not translated into http headers:

Expand|Select|Wrap|Line Numbers
  1.     Accept: "*/*"
  2.     Accept-Encoding: "identity;q=1, *;q=0"
  3.     Accept-Language: "it,en;q=0.8"
  4.     Connection: "keep-alive"
  5.     Cookie: "laravel_session=dummy
  6.     DNT: "1"
  7.     Host: "192.168.2.2:8888"
  8.     Range: "bytes=0-"
  9.     User-Agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2535.0 Safari/537.36"
See, no Authorization header. If I call the api from SoapUI:

Expand|Select|Wrap|Line Numbers
  1.     "Accept-Encoding": "gzip,deflate",
  2.     "Authorization": "Bearer dummy",
  3.     "Host": "fillusso:8888",
  4.     "Connection": "Keep-Alive",
  5.     "User-Agent": "Apache-HttpClient/4.1.1 (java 1.5)"
It's a kind of magic, the header is there (because it directly sent from SoapUI, no parsing or meta tag here).

How can I solve the problem? Am I doing everything all right?
Oct 17 '15 #1
0 5854

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Terence | last post by:
A curious observation: I have my apache web server configured for the PHP apache module to parse files ending in the .php extension. nothing unusual about that, but I also noticed that if I...
6
by: Els | last post by:
***newbie question*** Hi, I am trying to make my server (Apache) parse .html files as .php. I found this line of code: ForceType application/x-httpd-php placed it in an .htaccess file and...
1
by: Titus Cheung | last post by:
Hello, Just installed Apache and PHP. Edited the .conf file for the appropariate addtype lines, and Apache itself is working. However, when I type in the URL for the test script, the browser...
27
by: Mxsmanic | last post by:
How can I combine SSI, CGI, and PHP in Apache 2.x? I keep reading that this can be done, but I haven't found any examples of the actual configuration required to do it. What I want to do is: ...
1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
14
by: Jim Carlock | last post by:
I have a couple easy questions possibly. 1) Is there a default.php page? The webserver seems to support default.htm, default.html, index.htm and index.html. It's an Apache server, I'd like to...
6
by: MaiyaHolliday | last post by:
Hello, I've recently installed apache on a new computer, and cannot figure out why my site will not process any includes. (it was working on my old one) There are no errors on the page such as...
24
by: Gary Hasler | last post by:
I want apache to parse all .html files for php code. Our 'real' web server is rented from ICDsoft ( php 5 on Apache on Linux whatever), and their instruction is to add the following to the...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
1
by: Robelius | last post by:
just installed on my development box the WAMP EasyPHP 12.0 which includesPHP 5.4.4 VC9 | PHP 5.3.14 VC9 | PHP 5.2.17 Apache 2.4.2 VC9 + MySQL 5.5.25a + PhpMyAdmin 3.5.1 + Xdebug 2.2.0. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.