You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2005/06/29 18:16:56 UTC
DO NOT REPLY [Bug 35547] New: -
Problems with libapreq 1.2 and Apache::Cookie
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=35547>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=35547
Summary: Problems with libapreq 1.2 and Apache::Cookie
Product: Apache httpd-1.3
Version: HEAD
Platform: PC
OS/Version: Windows 2000
Status: NEW
Severity: major
Priority: P2
Component: Other
AssignedTo: bugs@httpd.apache.org
ReportedBy: dev@lyl-canbys.de
Using Apache::Cookie and libapreq 1.2 causes problems adding cookie headers in
Apaches 1.33 request.
If you use relative values for expires, the set-cookie header gets corrupted.
Example code:
#!/usr/bin/perl
local $| = 1;
use strict;
use warnings;
use Apache ();
use Apache::Cookie ();
my $r = Apache->request();
my $cookie = Apache::Cookie->new($r,
-name => 'foo',
-value => 'bar',
-expires => '+3M',
-domain => '.capricorn.com',
-path => '/cgi-bin/database',
-secure => 1
);
$cookie->bake();
$r->content_type( "text/html" );
$r->send_http_header();
$r->print ("This is a Test");
1;
The result is a corrupt header like this:
200 OK
Connection: close
Date: Wed, 29 Jun 2005 07:50:50 GMT
Server: Apache/1.3.33 (Win32) mod_ssl/2.8.22 OpenSSL/0.9.7f DAV/1.0.3-dev
mod_perl/1.29_01-dev mod_jk/1.2.8
Content-Type: text/plain
Client-Date: Wed, 29 Jun 2005 07:50:50 GMT
Client-Peer: 192.168.0.11:80
Client-Response-Num: 1
Set-Cookie: foo=bar; domain=.capricorn.com; path=/cgi-bin/database; expires=@
�������������%ˆ@�%T@‹D$…�u9DT~.�
DT‹
\@ƒ�‹ ‰
HTu?h€, 27-$…�u9DT~.�
DT‹
\@ƒ�‹ ‰
HTu?h€-2005 07:50:50 GMT; secure
Randy Kobes was alredy contacted.
>Hello Mr. Kobes,
>
>I'm running for compatibility issues a apache 1.3.33 on win32 under mod_perl.
>
>Yesterday i found an annyoing problem with current Apache::Cookie from your
>repository (libapreq-1 [1.2] and mod_perl-eapi-1 [1.29_01-dev])
>
>Using relative values for -expires destructs the header in Apaches request!
>
>My simple code is appended in apachecookie.pl
>* Please exchange line 16 with line 17 and see the result!
>
>Header scanned with perls HEAD.
>* Destructed Header in header-notok.txt
>* Header with working Apache::Cookie -expires in header-ok.txt
Randy Kobes wrote:
>>Thanks for the message. This may be a bug - could you
>>forward the details to the apreq mailing list? Thanks.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org