Skip Menu |

This queue is for tickets about the IO-Lambda CPAN distribution.

Report information
The Basics
Id: 73924
Status: resolved
Priority: 0/
Queue: IO-Lambda

People
Owner: Nobody in particular
Requestors: oleg [...] cpan.org
Cc:
AdminCc:

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



Subject: IO::Lambda::HTTP: no way to specify relative url
Hi Dmitry As I understand IO::Lambda::HTTP there is no way to perform request using relative url. For example to get google.com the request will be: GET http://google.com/ HTTP/1.1 Host: google.com User-Agent: perl/IO-Lambda-HTTP v1.21 But most software uses relative url and request looks like: GET / HTTP/1.1 Host: google.com User-Agent: perl/IO-Lambda-HTTP v1.21 As I understand HTTP/1.1 specification clients should use absolute url only in requests to proxies. However in same sentence: "all HTTP/1.1 servers MUST accept the absoluteURI form in requests" (http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5.1.2). But this is theory. Here is some practice: ---------------------- $ nc www.perl.org 80 GET http://www.perl.org/ HTTP/1.1 Host: www.perl.org HTTP/1.1 500 Internal Server Error ---------------------- $ nc www.perl.org 80 GET / HTTP/1.1 Host: www.perl.org HTTP/1.1 200 OK ---------------------- As you can see some servers can't understand absolute url. I think we should have some workaround for this issue.
Hi, I was pretty sure I coded around that specific HTTP/1.1 feature, but apparently I didn't. Could you possibly test the attached patch and tell if it works for you? Thanks! /dk
Subject: patch
Download patch
application/octet-stream 1.1k

Message body not shown because it is not plain text.

On Thu Jan 12 13:18:01 2012, KARASIK wrote: Show quoted text
> Hi, > > I was pretty sure I coded around that specific HTTP/1.1 feature, but > apparently I didn't. Could you possibly test the attached patch and tell > if it works for you? Thanks! > > /dk
It works, but only for urls that has '/' at the end. Here is my test script: https://gist.github.com/1601965 (this my first lambda-style io script)
alright ... what about this patch then? (it has to be applied after the first one)
Subject: patch2
Download patch2
application/octet-stream 750b

Message body not shown because it is not plain text.

It works now. Thanks!