Rewrite Content-Length ?

Oh, the strange things mod_rewrite does!

Rewrite Content-Length ?

Postby jeannie » Mon Mar 26, 2007 6:28 pm

I'm using apache httpd 2.2.4 as a forwarding proxy on Solaris 10.

User intiates the session to a target host. The browser -> my proxy (1st hop) -> their proxy (2nd hop) -> target host

My browser prompts for authentication, but it never checks against the ldap server. I continually get prompts for authentication. Anything type in (u/p) seems to be ignored. My (1st hop) proxy's error_log shows this:

[Mon Mar 26 21:58:10 2007] [error] [client 172.16.1.200] Invalid Content-Length

When I'm logged into my 1st hop proxy and manually make the 2nd hop connection, this is what I see:

Trying 172.16.1.200...
Connected to 2nd-hop-proxy.
Escape character is '^]'.
GET http://target-host.com/ HTTP/1.0

HTTP/1.0 407 Proxy Authentication Required
Content-Type: text/html
Connection: keep-alive
Content-Length: *
Proxy-Authenticate: Basic realm="Proxy Authentication"


According to RFC 1945, the only valid values for Content-Length are numerical, 0 and up.

Has anyone seen this before?

I have read that mod_rewrite applies only to the client's side of the conversation, not to the server (2nd hop proxy, in this case). Is this still the case? Is there some easy way to mod_rewrite the asterisk into something else???

Thanks for your time,

Jean
jeannie
 
Posts: 1
Joined: Mon Mar 26, 2007 6:15 pm

Postby richardk » Tue Mar 27, 2007 11:11 am

Is there some easy way to mod_rewrite the asterisk into something else?

Not as far as i know. I don't think it can change HTTP headers. Is it your browser sending the *? Or one of the other servers? What are you using to proxy the request? Mod_proxy?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Idiosyncrasies

Who is online

Users browsing this forum: No registered users and 6 guests

cron