Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
http_parser: upgrade to 62110ef
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Feb 20, 2012
1 parent b0c1541 commit f0c5165
Show file tree
Hide file tree
Showing 7 changed files with 1,782 additions and 602 deletions.
4 changes: 4 additions & 0 deletions deps/http_parser/.mailmap
@@ -0,0 +1,4 @@
# update AUTHORS with:
# git log --all --reverse --format='%aN <%aE>' | perl -ne 'BEGIN{print "# Authors ordered by first contribution.\n"} print unless $h{$_}; $h{$_} = 1' > AUTHORS
Ryan Dahl <ry@tinyclouds.org>
Salman Haq <salman.haq@asti-usa.com>
32 changes: 32 additions & 0 deletions deps/http_parser/AUTHORS
@@ -0,0 +1,32 @@
# Authors ordered by first contribution.
Ryan Dahl <ry@tinyclouds.org>
Jeremy Hinegardner <jeremy@hinegardner.org>
Sergey Shepelev <temotor@gmail.com>
Joe Damato <ice799@gmail.com>
tomika <tomika_nospam@freemail.hu>
Phoenix Sol <phoenix@burninglabs.com>
Cliff Frey <cliff@meraki.com>
Ewen Cheslack-Postava <ewencp@cs.stanford.edu>
Santiago Gala <sgala@apache.org>
Tim Becker <tim.becker@syngenio.de>
Jeff Terrace <jterrace@gmail.com>
Ben Noordhuis <info@bnoordhuis.nl>
Nathan Rajlich <nathan@tootallnate.net>
Mark Nottingham <mnot@mnot.net>
Aman Gupta <aman@tmm1.net>
Tim Becker <tim.becker@kuriositaet.de>
Sean Cunningham <sean.cunningham@mandiant.com>
Peter Griess <pg@std.in>
Salman Haq <salman.haq@asti-usa.com>
Cliff Frey <clifffrey@gmail.com>
Jon Kolb <jon@b0g.us>
Fouad Mardini <f.mardini@gmail.com>
Paul Querna <pquerna@apache.org>
Felix Geisendörfer <felix@debuggable.com>
koichik <koichik@improvement.jp>
Andre Caron <andre.l.caron@gmail.com>
Ivo Raisr <ivosh@ivosh.net>
James McLaughlin <jamie@lacewing-project.org>
David Gwynne <loki@animata.net>
LE ROUX Thomas <thomas@procheo.fr>
Randy Rizun <rrizun@ortivawireless.com>
10 changes: 8 additions & 2 deletions deps/http_parser/Makefile
Expand Up @@ -10,7 +10,7 @@ CPPFLAGS_FAST += $(CPPFLAGS_FAST_EXTRA)
CFLAGS += -Wall -Wextra -Werror
CFLAGS_DEBUG = $(CFLAGS) -O0 -g $(CFLAGS_DEBUG_EXTRA)
CFLAGS_FAST = $(CFLAGS) -O3 $(CFLAGS_FAST_EXTRA)

CFLAGS_LIB = $(CFLAGS_FAST) -fPIC

test: test_g test_fast
./test_g
Expand Down Expand Up @@ -40,13 +40,19 @@ test-run-timed: test_fast
test-valgrind: test_g
valgrind ./test_g

libhttp_parser.o: http_parser.c http_parser.h Makefile
$(CC) $(CPPFLAGS_FAST) $(CFLAGS_LIB) -c http_parser.c -o libhttp_parser.o

library: libhttp_parser.o
$(CC) -shared -o libhttp_parser.so libhttp_parser.o

package: http_parser.o
$(AR) rcs libhttp_parser.a http_parser.o

tags: http_parser.c http_parser.h test.c
ctags $^

clean:
rm -f *.o *.a test test_fast test_g http_parser.tar tags
rm -f *.o *.a test test_fast test_g http_parser.tar tags libhttp_parser.so libhttp_parser.o

.PHONY: clean package test-run test-run-timed test-valgrind
7 changes: 7 additions & 0 deletions deps/http_parser/README.md
Expand Up @@ -164,6 +164,13 @@ and apply following logic:
------------------------ ------------ --------------------------------------------


Parsing URLs
------------

A simplistic zero-copy URL parser is provided as `http_parser_parse_url()`.
Users of this library may wish to use it to parse URLs constructed from
consecutive `on_url` callbacks.

See examples of reading in headers:

* [partial example](http://gist.github.com/155877) in C
Expand Down

0 comments on commit f0c5165

Please sign in to comment.