Bug 602703 - Review Request: perl-HTTP-Parser - Parse HTTP/1.1 request into HTTP::Request/Response object
Summary: Review Request: perl-HTTP-Parser - Parse HTTP/1.1 request into HTTP::Request/...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Yanko Kaneti
QA Contact: Fedora Extras Quality Assurance
URL: http://search.cpan.org/dist/HTTP-Parser/
Whiteboard:
Depends On:
Blocks: 602674
TreeView+ depends on / blocked
 
Reported: 2010-06-10 14:17 UTC by Petr Pisar
Modified: 2013-05-07 13:03 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-18 11:07:23 UTC
yaneti: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Petr Pisar 2010-06-10 14:17:51 UTC
Spec URL: http://ppisar.fedorapeople.org/perl-HTTP-Parser/perl-HTTP-Parser.spec
SRPM URL: http://ppisar.fedorapeople.org/perl-HTTP-Parser/perl-HTTP-Parser-0.04-1.fc13.src.rpm
Description:
This is an HTTP request parser. It takes chunks of text as received and
returns a 'hint' as to what is required, or returns the HTTP::Request when
a complete request has been read. HTTP/1.1 chunking is supported. It dies
if it finds an error.

Notice to reviewer regarding spelling: rpmlint does not know `chunking', despite it's regular English word.

This spec file builds on F14--12.

Comment 1 Yanko Kaneti 2010-06-15 08:38:24 UTC
Source matches.
License matches.

Builds in mock.
No crazy provides or requires.
rpmlint silent other than the spelling thing mentioned.
No missing docs.
Owns what it should.

Note: Please drop these explicit requires.
Requires:       perl(HTTP::Request)
Requires:       perl(HTTP::Response)
Requires:       perl(URI)
The automatic perl dep generator takes care of them.

APPROVED

Comment 2 Shakthi Kannan 2010-06-15 09:18:37 UTC
On Fedora 13 with Perl 5.10.1, the example in the README file emits error:

  syntax error at /tmp/foo.pl line 9, near "while my "
  syntax error at /tmp/foo.pl line 12, near "}"
  Execution of /tmp/foo.pl aborted due to compilation errors.

Can you please check?

Comment 3 Petr Pisar 2010-06-15 09:53:24 UTC
Thanks for report. Just replace the `while' with `foreach'.

https://rt.cpan.org/Public/Bug/Display.html?id=58404

Comment 4 Petr Pisar 2010-06-15 10:09:03 UTC
New Package CVS Request
=======================
Package Name: perl-HTTP-Parser
Short Description: Parse HTTP/1.1 request into HTTP::Request/Response object
Owners: ppisar mmaslano psabata
Branches: F-12 F-13
InitialCC: perl-sig

Comment 5 Shakthi Kannan 2010-06-15 10:12:47 UTC
I get the following output, after changing 'while' with 'foreach':

$ perl foo.pl
passing 'GET / HTTP/1.1' got '-2'
passing 'Host: localhost' got '-2'
passing 'Connection: close' got '-2'
passing '' got '0'
passing '' got '-2'
Can't call method "as_string" without a package or object reference at foo.pl line 15.

Anything is required to be included for "as_string" to function? 

Can you please update the README with the changes?

Comment 6 Petr Pisar 2010-06-15 11:28:38 UTC
Ok, the full working example is:


use HTTP::Parser;

my $parser = HTTP::Parser->new();
my @lines = ('GET / HTTP/1.1','Host: localhost','Connection: close','','');

my $result;
foreach my $line (@lines) {
  $result = $parser->add("$line\x0d\x0a");
  print "passing '$line' got '$result'\n";
}
print $parser->object->as_string();


There was missing `object' method call. Run `perldoc HTTP::Parser' for more details. The example seems be written from scratch without testing.

I will correct it in distribution package not to mislead Fedora users.

Comment 7 Shakthi Kannan 2010-06-15 12:01:05 UTC
@Petr: That worked! Thanks for your prompt response!

Comment 8 Huzaifa S. Sidhpurwala 2010-06-18 08:43:42 UTC
cvs done

Comment 9 Petr Pisar 2010-06-18 11:07:23 UTC
Thank you for review and CVS update. Package built for F14--12.

Comment 10 Fedora Update System 2010-07-07 17:42:15 UTC
perl-HTTP-Parser-0.05-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Andrea Veri 2013-05-07 11:56:44 UTC
Package Change Request
======================
Package Name: perl-HTTP-Parser
New Branches: el6
Owners: averi psabata
InitialCC: perl-sig

Comment 12 Gwyn Ciesla 2013-05-07 13:03:10 UTC
Git done (by process-git-requests).


Note You need to log in before you can comment on or make changes to this bug.