I will look into this, but wanted to make record of it
in case others were having similar difficulties.
It seems that if MiddleMan doesn't directly serve a
file, it blows the status code (and consequently status
message) away.
I thought this might have been an HTTP/1.0 related
problem, but it appears not.
Hopefully I'll follow this up with a patch that fixes
it, but no promises thanks to my overwhelming day-job.
=================================
$ nc localhost 4321
GET /non-existant-file HTTP/1.0
HTTP/1.1 792491125 Unknown
Content-Type: text/html
Content-Length: 2304
Connection: close
Proxy-Connection: close
=================================
$ nc localhost 4321
GET /proxy.pac HTTP/1.1
Host: localhost
Connection: close
HTTP/1.1 792491125 Unknown
Content-Type: application/x-ns-proxy-autoconfig
Content-Length: 80
Connection: close
Proxy-Connection: close
function FindProxyForURL(url, host) {
return "PROXY 127.0.0.1:4321;DIRECT"
}
=================================
$ nc localhost 4321
GET /proxy.pac HTTP/1.0
HTTP/1.1 792491125 Unknown
Content-Type: application/x-ns-proxy-autoconfig
Content-Length: 80
Connection: close
Proxy-Connection: close
function FindProxyForURL(url, host) {
return "PROXY 127.0.0.1:4321;DIRECT"
}
Logged In: YES
user_id=432781
Hi,
Thanks.. I was able to find the problem. A pointer is passed from
template_section::send to template_section::get to store the status
code, if any... When things were converted over to STL lists, the test
"templ != NULL" near the end of the function became invalid.. it should
now be "templ != template_list.end()". The bug causes the status
code of all internal templates to be garbage.