Skip Menu |

This queue is for tickets about the Net-HTTPServer CPAN distribution.

Report information
The Basics
Id: 6367
Status: resolved
Worked: 1.2 hours (70 min)
Priority: 0/
Queue: Net-HTTPServer

People
Owner: reatmon [...] mail.com
Requestors: lars.berntzon [...] cecilia-data.se
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Net:::HTTPServer gives error code 406 in win32
First I had to comment out the blocking stuff. Then it was a problem when the code checked what document types the browser accepts. The accept header was examined with the trailing DOS newline not removed. This patch removes that check.
*** HTTPServer.pm Wed May 19 23:06:56 2004 --- HTTPServer-org.pm Tue May 18 16:36:20 2004 *************** *** 592,598 **** $self->{SOCK} = new IO::Socket::INET(LocalPort=>$port, Proto=>"tcp", Listen=>10, ! Reuse=>1); } else { --- 592,599 ---- $self->{SOCK} = new IO::Socket::INET(LocalPort=>$port, Proto=>"tcp", Listen=>10, ! Reuse=>1, ! Blocking=>0); } else { *************** *** 937,943 **** $headers{'__TRACE__'} = $request if ($method eq "TRACE"); ! my ($headers,$body) = ($request =~ /^(.+?)\r?\n\n?\r(.*?)$/s); $self->_debug("REQ","_ReadRequest: headers($headers)"); $self->_debug("REQ","_ReadRequest: body($body)"); --- 938,944 ---- $headers{'__TRACE__'} = $request if ($method eq "TRACE"); ! my ($headers,$body) = ($request =~ /^(.+?)\r?\n\r?\n(.*?)$/s); $self->_debug("REQ","_ReadRequest: headers($headers)"); $self->_debug("REQ","_ReadRequest: body($body)"); *************** *** 1390,1396 **** my $self = shift; my $client = shift; ! #$self->_nonblock($client); my $select = new IO::Select($client); my $request = ""; --- 1391,1397 ---- my $self = shift; my $client = shift; ! $self->_nonblock($client); my $select = new IO::Select($client); my $request = ""; *************** *** 1730,1736 **** $accept =~ s/\s*\,\s*/\,/g; $accept =~ s/\s*\;\s*/\;/g; - $accept =~ s/[\r\n]+$//; my ($mainType,$subType) = split("/",$contentType,2); --- 1731,1736 ----
I have merged in fixes for the \r\n and the Accept. However, the solution to just nuke all of the blocking related code is not acceptable. I will try yet again to find a solution that will work for both Unix and Windows. Ryan Eatmon
Ok... I finally found time to find a Windows box, install ActiveState and test. 0.9.3 should fix the windows problems. Please let me know if anything else is broken. Ryan Eatmon