sergot / http-useragent

Web user agent class for Perl 6.
MIT License
36 stars 39 forks source link

Weird debug info printed #163

Closed bbkr closed 7 years ago

bbkr commented 7 years ago

There is some weird debug line printed during some requests:

$ perl6 -e 'use HTTP::UserAgent; HTTP::UserAgent.new.get("http://alfapark.pl/wp-admin/admin-ajax.php")'
Max-Age=0

Looks like its something in Cookies code, because response headers are:

HTTP/1.1 200 OK
Date: Sun, 19 Feb 2017 15:30:55 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: IdeaWebServer/v0.80
Set-Cookie: icwp-app-flash=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/
                                                                           ^^^^^^^^^^

Module and dependencies installed on 2017.01 Rakudo on 2017-02-19.

astj commented 7 years ago

Maybe this line? https://github.com/sergot/http-useragent/blob/master/lib/HTTP/Cookies.pm6#L40

jonathanstowe commented 7 years ago

Weird, that's been in there for a year and no-one noticed before. Clearly that branch isn't well tested :)

Fixing.

jonathanstowe commented 7 years ago

Removed that and added an additional test.

bbkr commented 7 years ago

Thanks for quick fix!