472,789 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,789 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>
  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: ""
  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 5384

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

Similar topics

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...
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...
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...
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: ...
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
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...
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...
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...
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...
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...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.