diff options
author | Leonardo Boshell <leonardop@gentoo.org> | 2005-10-27 23:31:46 +0000 |
---|---|---|
committer | Leonardo Boshell <leonardop@gentoo.org> | 2005-10-27 23:31:46 +0000 |
commit | 70fd27c1f7c98f3ce30c65e57360e66f483b8bfa (patch) | |
tree | 0566ce25aa9ef490303dcea914d55f7d4922c18d /net-libs/libwww | |
parent | - initial commit of sparse. Bug #110656 (diff) | |
download | historical-70fd27c1f7c98f3ce30c65e57360e66f483b8bfa.tar.gz historical-70fd27c1f7c98f3ce30c65e57360e66f483b8bfa.tar.bz2 historical-70fd27c1f7c98f3ce30c65e57360e66f483b8bfa.zip |
New revision, with a patched HTBound.c (bug #109040).
Package-Manager: portage-2.0.53_rc6
Diffstat (limited to 'net-libs/libwww')
-rw-r--r-- | net-libs/libwww/ChangeLog | 9 | ||||
-rw-r--r-- | net-libs/libwww/Manifest | 16 | ||||
-rw-r--r-- | net-libs/libwww/files/digest-libwww-5.4.0-r4 (renamed from net-libs/libwww/files/digest-libwww-5.4.0-r2) | 2 | ||||
-rw-r--r-- | net-libs/libwww/files/libwww-5.4.0-gentoo.diff | 33 | ||||
-rw-r--r-- | net-libs/libwww/files/libwww-5.4.0-htbound.patch | 535 | ||||
-rw-r--r-- | net-libs/libwww/libwww-5.4.0-r4.ebuild (renamed from net-libs/libwww/libwww-5.4.0-r2.ebuild) | 33 |
6 files changed, 576 insertions, 52 deletions
diff --git a/net-libs/libwww/ChangeLog b/net-libs/libwww/ChangeLog index 877c87e50d96..849ec68386cc 100644 --- a/net-libs/libwww/ChangeLog +++ b/net-libs/libwww/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-libs/libwww # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libwww/ChangeLog,v 1.35 2005/09/30 22:47:54 matsuu Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libwww/ChangeLog,v 1.36 2005/10/27 23:31:46 leonardop Exp $ + +*libwww-5.4.0-r4 (27 Oct 2005) + + 27 Oct 2005; Leonardo Boshell <leonardop@gentoo.org> + +files/libwww-5.4.0-htbound.patch, +libwww-5.4.0-r4.ebuild: + Added patch with a new implementation of HTBound.c, fixing several logic + errors (bug #109040). 30 Sep 2005; MATSUU Takuto <matsuu@gentoo.org> libwww-5.4.0-r3.ebuild: Stable on sh. diff --git a/net-libs/libwww/Manifest b/net-libs/libwww/Manifest index b77e0b785996..f26bae2c9d28 100644 --- a/net-libs/libwww/Manifest +++ b/net-libs/libwww/Manifest @@ -1,12 +1,12 @@ -MD5 4c70dae7ce4964982b3ebe728633f9f0 libwww-5.4.0-r3.ebuild 1943 -MD5 984489f38680d691273e30c3928f674c libwww-5.4.0-r2.ebuild 1659 -MD5 174084ed3b70e36f1bc8e357aac2a342 ChangeLog 5043 -MD5 c472f5fd1646eb8bca71d8df5cb2bdcc metadata.xml 164 -MD5 e99f48d15e0834666b84203b48805872 files/libwww-config-liborder.patch 776 -MD5 078b6239f293e1cc65f3f977b3136317 files/digest-libwww-5.4.0-r2 151 +MD5 58084aaaa1911baf613dfccd421ef607 ChangeLog 5295 MD5 078b6239f293e1cc65f3f977b3136317 files/digest-libwww-5.4.0-r3 151 -MD5 ee0dd3b8a76bf8b9e6d051663119eb40 files/libwww-5.4.0-automake-gentoo.diff 346 -MD5 507c03693bfa1c4f9974efbc3644c682 files/libwww-5.4.0-gentoo.diff 1089 +MD5 4c3f7314020d5a1a6a01463a71b4944c files/digest-libwww-5.4.0-r4 151 MD5 1866b237427a244b9923469b52f54473 files/libwww-5.4.0-autoconf-gentoo.diff 1089 +MD5 ee0dd3b8a76bf8b9e6d051663119eb40 files/libwww-5.4.0-automake-gentoo.diff 346 MD5 0851f5aef9f0960efcdcabfdfa960341 files/libwww-5.4.0-disable-ndebug-gentoo.diff 370 +MD5 d90238479e44d0a5f18969046f748d56 files/libwww-5.4.0-htbound.patch 13687 MD5 b0a8e638d02da0d0284e8555866f1f38 files/libwww-5.4.0-mysql-4.1.patch 1674 +MD5 e99f48d15e0834666b84203b48805872 files/libwww-config-liborder.patch 776 +MD5 4c70dae7ce4964982b3ebe728633f9f0 libwww-5.4.0-r3.ebuild 1943 +MD5 b4341ac093ab7dc5be8798779fce35fb libwww-5.4.0-r4.ebuild 2158 +MD5 c472f5fd1646eb8bca71d8df5cb2bdcc metadata.xml 164 diff --git a/net-libs/libwww/files/digest-libwww-5.4.0-r2 b/net-libs/libwww/files/digest-libwww-5.4.0-r4 index c421f4580c12..5464fae96380 100644 --- a/net-libs/libwww/files/digest-libwww-5.4.0-r2 +++ b/net-libs/libwww/files/digest-libwww-5.4.0-r4 @@ -1,2 +1,2 @@ -MD5 c3734ca6caa405707e134cc8c6d7e422 w3c-libwww-5.4.0.tgz 1129121 MD5 dcaddf44692252045090584a7d63082c libwww-5.4.0-debian-autoconf-2.5.patch.bz2 8338 +MD5 c3734ca6caa405707e134cc8c6d7e422 w3c-libwww-5.4.0.tgz 1129121 diff --git a/net-libs/libwww/files/libwww-5.4.0-gentoo.diff b/net-libs/libwww/files/libwww-5.4.0-gentoo.diff deleted file mode 100644 index 01058215f326..000000000000 --- a/net-libs/libwww/files/libwww-5.4.0-gentoo.diff +++ /dev/null @@ -1,33 +0,0 @@ -diff -urN w3c-libwww-5.4.0.ORIG/configure.in w3c-libwww-5.4.0/configure.in ---- w3c-libwww-5.4.0.ORIG/configure.in 2002-06-12 18:26:46.000000000 +0900 -+++ w3c-libwww-5.4.0/configure.in 2003-10-02 18:43:41.000000000 +0900 -@@ -618,19 +618,16 @@ - ssllib="-L/usr/lib -lssl -lcrypto" - fi - dnl find the ssl include dir (empirical) --if test -d '/usr/local/ssl/include'; then -- sslinc="-I/usr/local/ssl/include" --elif test -d '/usr/local/openssl/include'; then -- sslinc="-I/usr/local/openssl/include" --elif test -d '/usr/local/include/openssl'; then -- sslinc="-I/usr/local/include/openssl" --elif test -d '/usr/include/ssl'; then -- sslinc="-I/usr/include/ssl" --elif test -d '/usr/include/openssl'; then -- sslinc="-I/usr/include/openssl" --else -- sslinc="" --fi -+ssldir="" -+for ssldir in /usr/local/ssl/include \ -+ /usr/local/openssl/include \ -+ /usr/local/include/openssl \ -+ /usr/include/ssl \ -+ /usr/include/openssl ; do -+ if test -d $ssldir -a -f $ssldir/ssl.h ; then -+ sslinc="-I$ssldir" -+ fi -+done - WWWSSL="" - SSLINC="" - LIBSSL="" diff --git a/net-libs/libwww/files/libwww-5.4.0-htbound.patch b/net-libs/libwww/files/libwww-5.4.0-htbound.patch new file mode 100644 index 000000000000..9801a52ab204 --- /dev/null +++ b/net-libs/libwww/files/libwww-5.4.0-htbound.patch @@ -0,0 +1,535 @@ +diff -NurdB w3c-libwww-5.4.0/Library/src/HTBound.c w3c-libwww-5.4.0-patched/Library/src/HTBound.c +--- w3c-libwww-5.4.0/Library/src/HTBound.c 1999-02-22 17:10:10.000000000 -0500 ++++ w3c-libwww-5.4.0-patched/Library/src/HTBound.c 2005-10-27 08:23:47.000000000 -0500 +@@ -3,7 +3,7 @@ + ** + ** (c) COPYRIGHT MIT 1995. + ** Please first read the full copyright statement in the file COPYRIGH. +-** @(#) $Id: libwww-5.4.0-htbound.patch,v 1.1 2005/10/27 23:31:46 leonardop Exp $ ++** @(#) HTBound.c,v 1.2 2005/06/06 15:22:10 mrsam Exp + ** + ** This stream parses a MIME multipart stream and builds a set of new + ** streams via the stream stack each time we encounter a boundary start. +@@ -11,9 +11,12 @@ + ** + ** Authors + ** HF Henrik Frystyk <frystyk@w3.org> ++** SV Sam Varshavchik <mrsam@courier-mta.com> + ** + ** History: + ** Nov 95 Written from scratch ++** SV Jun 05 Rewrote HTBoundary_put_block. Fixed many bugs+segfaults. ++** SV Jul 05 Fix double-counting of processed bytes. + ** + */ + +@@ -23,104 +26,395 @@ + #include "WWWCore.h" + #include "HTMerge.h" + #include "HTReqMan.h" ++#include "HTNetMan.h" ++#include "HTChannl.h" + #include "HTBound.h" /* Implemented here */ + +-#define PUTBLOCK(b, l) (*me->target->isa->put_block)(me->target, b, l) ++#define PUTBLOCK(b, l) (me->target ? (*me->target->isa->put_block)(me->target, b, l):HT_OK) ++ + #define PUTDEBUG(b, l) (*me->debug->isa->put_block)(me->debug, b, l) + #define FREE_TARGET (*me->target->isa->_free)(me->target) + + struct _HTStream { + const HTStreamClass * isa; ++ HTNet * net; + HTStream * target; + HTStream * orig_target; + HTFormat format; + HTStream * debug; /* For preamble and epilog */ + HTRequest * request; +- BOOL body; /* Body or preamble|epilog */ +- HTEOLState state; +- int dash; /* Number of dashes */ + char * boundary; +- char * bpos; ++ ++ BOOL keptcrlf; ++ int (*state)(HTStream *, const char *, int); ++ ++ char *boundary_ptr; ++ + }; + ++PRIVATE int HTBoundary_flush (HTStream * me); ++ + /* ------------------------------------------------------------------------- */ + ++PRIVATE int start_of_line (HTStream * me, const char * b, int l); ++PRIVATE int seen_dash (HTStream * me, const char * b, int l); ++PRIVATE int seen_doubledash (HTStream * me, const char * b, int l); ++PRIVATE int seen_delimiter_nonterminal(HTStream * me, const char * b, int l); ++PRIVATE int seen_delimiter_nonterminal_CR(HTStream * me, const char * b, int l); ++PRIVATE int seen_delimiter_dash(HTStream * me, const char * b, int l); ++PRIVATE int seen_delimiter_terminal(HTStream * me, const char * b, int l); ++PRIVATE int seen_delimiter_terminal_CR(HTStream * me, const char * b, int l); ++PRIVATE int not_delimiter(HTStream * me, const char * b, int l, int extra); ++PRIVATE int seen_nothing(HTStream * me, const char * b, int l); ++PRIVATE int seen_cr(HTStream * me, const char * b, int l); ++PRIVATE void process_boundary(HTStream *me, int isterminal); ++ ++#define UNUSED(l) (l=l) /* Shut up about unused variables */ ++ + PRIVATE int HTBoundary_put_block (HTStream * me, const char * b, int l) + { +- const char *start = b; +- const char *end = b; +- while (l-- > 0) { +- if (me->state == EOL_FCR) { +- me->state = (*b == LF) ? EOL_FLF : EOL_BEGIN; +- } else if (me->state == EOL_FLF) { +- if (me->dash == 2) { +- while (l>0 && *me->bpos && *me->bpos==*b) l--, me->bpos++, b++; +- if (!*me->bpos) { +- HTTRACE(STREAM_TRACE, "Boundary.... `%s\' found\n" _ me->boundary); +- me->bpos = me->boundary; +- me->body = YES; +- me->state = EOL_DOT; +- } else if (l>0) { +- me->dash = 0; +- me->bpos = me->boundary; +- me->state = EOL_BEGIN; +- } +- } +- if (*b == '-') { +- me->dash++; +- } else if (*b != CR && *b != LF) { +- me->dash = 0; +- me->state = EOL_BEGIN; +- } +- } else if (me->state == EOL_SLF) { /* Look for closing '--' */ +- if (me->dash == 4) { +- if (end > start) { +- int status = PUTBLOCK(start, end-start); +- if (status != HT_OK) return status; ++ /* ++ ** The HTBoundary object gets attached downstream of HTMime. ++ ** The HTBoundary object creates another HTMime object downstream of ++ ** the HTBoundary object. ++ ** ++ ** When we push data downstream to the second HTBoundary object, it ++ ** updates the bytes read count in the HTNet object. ++ ** ++ ** When we return to the parent HTMime object, itupdates the ++ ** bytes read count in the HTNet object again. Oops. ++ ** ++ ** Same thing happens with the consumed byte count. We can prevent ++ ** the consumed byte counts from being updated by temporary setting ++ ** the input channel stream pointer to NULL, but for the byte counts ++ ** we have to save them and restore them before existing. ++ ** ++ ** This bug was discovered by chance when a multipart/partial response ++ ** was partially received, and as a result of double-counting the ++ ** real response got cut off (because HTMime thought that more bytes ++ ** were processed than actually were, thus it processed only the ++ ** partial count of the remaining bytes in the response). When the ++ ** multipart/partial response was received all at once this bug did ++ ** not get triggered. ++ */ ++ ++ HTHost *host=HTNet_host(me->net); ++ HTChannel *c=HTHost_channel(host); ++ HTInputStream *i=HTChannel_input(c); ++ ++ long saveBytesRead=HTNet_bytesRead(me->net); ++ long saveHeaderBytesRead=HTNet_headerBytesRead(me->net); ++ ++ if (i) ++ HTChannel_setInput(c, NULL); ++ ++ HTTRACE(STREAM_TRACE, "Boundary: processing %d bytes\n" _ l); ++ /* Main loop consumes all input */ ++ ++ while (l) ++ { ++ int n= (*me->state)(me, b, l); ++ ++ if (n == 0) ++ return HT_ERROR; ++ b += n; ++ l -= n; ++ } ++ ++ if (i) ++ HTChannel_setInput(c, i); ++ HTNet_setBytesRead(me->net, saveBytesRead); ++ HTNet_setHeaderBytesRead(me->net, saveHeaderBytesRead); ++ ++ return HT_OK; ++} ++ ++/* ++** Start of line, keptcrlf=YES if we've kept the preceding CRLF from downstream ++** and we'll pass it along if we decide that this is not a boundary delimiter. ++*/ ++ ++PRIVATE int start_of_line (HTStream * me, const char * b, int l) ++{ ++ if (*b != '-') ++ return not_delimiter(me, b, l, 0); ++ ++ HTTRACE(STREAM_TRACE, "Boundary: start of line: input '-'\n"); ++ ++ me->state= seen_dash; ++ ++ return 1; ++} ++ ++/* ++** Line: - ++*/ ++ ++PRIVATE int seen_dash (HTStream * me, const char * b, int l) ++{ ++ if (*b != '-') ++ return not_delimiter(me, b, l, 1); ++ ++ HTTRACE(STREAM_TRACE, "Boundary: start of line: input '--'\n"); ++ ++ me->state= seen_doubledash; ++ me->boundary_ptr=me->boundary; ++ return 1; ++} ++ ++/* ++** Line: -- ++*/ ++ ++PRIVATE int seen_doubledash (HTStream * me, const char * b, int l) ++{ ++ me->state=seen_doubledash; ++ ++ if (*me->boundary_ptr) ++ { ++ if (*b != *me->boundary_ptr) ++ { ++ return not_delimiter(me, b, l, ++ me->boundary_ptr - me->boundary ++ + 2); + } +- HTTRACE(STREAM_TRACE, "Boundary.... Ending\n"); +- start = b; +- me->dash = 0; +- me->state = EOL_BEGIN; +- } +- if (*b == '-') { +- me->dash++; +- } else if (*b != CR && *b != LF) { +- me->dash = 0; +- me->state = EOL_BEGIN; +- } +- me->body = NO; +- } else if (me->state == EOL_DOT) { +- int status; +- if (me->body) { +- if (me->target) FREE_TARGET; ++ ++me->boundary_ptr; ++ return 1; ++ } ++ ++ /* ++ ** Line: --delimiter ++ */ ++ ++ if (*b == '-') ++ { ++ HTTRACE(STREAM_TRACE, ++ "Boundary: start of line: input '--%s-'\n" ++ _ me->boundary); ++ ++ me->state=seen_delimiter_dash; ++ return 1; ++ } ++ ++ HTTRACE(STREAM_TRACE, ++ "Boundary: Found: '--%s'\n" _ me->boundary); ++ ++ return seen_delimiter_nonterminal(me, b, l); ++} ++ ++/* ++** Line: --delimiter ++** ++** Waiting for CRLF. ++*/ ++ ++ ++PRIVATE int seen_delimiter_nonterminal(HTStream * me, const char * b, int l) ++{ ++ UNUSED(l); ++ ++ me->state=seen_delimiter_nonterminal; ++ if (*b == CR) ++ me->state=seen_delimiter_nonterminal_CR; ++ ++ return 1; ++} ++ ++/* ++** Line: --delimiter<CR> ++*/ ++ ++PRIVATE int seen_delimiter_nonterminal_CR(HTStream * me, const char * b, int l) ++{ ++ HTTRACE(STREAM_TRACE, ++ "Boundary: Found: '--%s<CR>'\n" _ me->boundary); ++ ++ if (*b != LF) ++ return seen_delimiter_nonterminal(me, b, l); ++ ++ HTTRACE(STREAM_TRACE, ++ "Boundary: Found: '--%s<CR><LF>'\n" _ me->boundary); ++ ++ process_boundary(me, NO); ++ return 1; ++} ++ ++/* ++** Line: --delimiter- ++*/ ++ ++PRIVATE int seen_delimiter_dash(HTStream * me, const char * b, int l) ++{ ++ if (*b != '-') ++ return seen_delimiter_nonterminal(me, b, l); ++ ++ HTTRACE(STREAM_TRACE, ++ "Boundary: start of line: input '--%s--'\n" ++ _ me->boundary); ++ ++ me->state=seen_delimiter_terminal; ++ return 1; ++} ++ ++/* ++** Line: --delimiter-- ++*/ ++ ++PRIVATE int seen_delimiter_terminal(HTStream * me, const char * b, int l) ++{ ++ UNUSED(l); ++ ++ me->state=seen_delimiter_terminal; ++ ++ if (*b == CR) ++ me->state=seen_delimiter_terminal_CR; ++ return 1; ++} ++/* ++** Line: --delimiter--<CR> ++*/ ++ ++PRIVATE int seen_delimiter_terminal_CR(HTStream * me, const char * b, int l) ++{ ++ HTTRACE(STREAM_TRACE, ++ "Boundary: Found '--%s--<CR>'\n" ++ _ me->boundary); ++ ++ if (*b != LF) ++ return seen_delimiter_terminal(me, b, l); ++ HTTRACE(STREAM_TRACE, ++ "Boundary: Found '--%s--<CR><LF>'\n" ++ _ me->boundary); ++ ++ process_boundary(me, YES); ++ return 1; ++} ++ ++/* ++** Beginning of the line does not contain a delimiter. ++** ++** ++** extra: Count of characters in a partially matched delimiter. Since it's ++** not a delimiter this is content that needs to go downstream. ++*/ ++ ++PRIVATE int not_delimiter(HTStream * me, const char * b, int l, int extra) ++{ ++ HTTRACE(STREAM_TRACE, "Boundary: not a delimiter line\n"); ++ ++ if (me->keptcrlf) ++ { ++ HTTRACE(STREAM_TRACE, "Boundary: Sending previous line's <CR><LF>\n"); ++ /* ++ ** Did not process CRLF from previous line, because prev CRLF ++ ** is considered a part of the delimiter. See MIME RFC. ++ */ ++ ++ me->keptcrlf=NO; ++ if (PUTBLOCK("\r\n", 2) != HT_OK) ++ return 0; ++ } ++ ++ /* ++ ** Potentially matched some of: --DELIMITER ++ */ ++ ++ if (extra) ++ { ++ HTTRACE(STREAM_TRACE, "Boundary: Sending partially-matched %d characters\n" _ extra); ++ ++ if (PUTBLOCK("--", extra > 2 ? 2:extra) != HT_OK) ++ return 0; ++ ++ if (extra > 2) ++ if (PUTBLOCK(me->boundary, extra-2) != HT_OK) ++ return 0; ++ } ++ return seen_nothing(me, b, l); ++} ++ ++/* ++** We're not looking for a delimiter. Look for the next line of input ++** in the data that could potentially be a delimiter. ++*/ ++ ++PRIVATE int seen_nothing(HTStream * me, const char * b, int l) ++{ ++ int i; ++ ++ me->state=seen_nothing; ++ ++ for (i=0; i<l; i++) ++ { ++ if (b[i] != CR) ++ continue; ++ ++ /* ++ ** If we have at least four more characters in unconsumed ++ ** input, and they're not \r\n--, we can safely skip over ++ ** them. ++ */ ++ ++ if (l-i > 4 && ++ strncmp(b+i, "\r\n--", 4)) ++ continue; ++ break; ++ } ++ ++ if (i == 0) ++ { ++ /* Could only be a CR here. */ ++ ++ me->state=seen_cr; ++ return 1; ++ } ++ ++ HTTRACE(STREAM_TRACE, "Boundary: Processed %d (out of %d) bytes\n" ++ _ i _ l); ++ ++ if (PUTBLOCK(b, i) != HT_OK) ++ return 0; ++ ++ return i; ++} ++ ++/* ++** State: seen a CR ++*/ ++ ++PRIVATE int seen_cr(HTStream * me, const char * b, int l) ++{ ++ HTTRACE(STREAM_TRACE, "Boundary: Processed <CR>\n"); ++ ++ if (*b != LF) ++ { ++ HTTRACE(STREAM_TRACE, "Boundary: ... <LF> didn't follow\n"); ++ if (PUTBLOCK("\r", 1) != HT_OK) ++ return 0; ++ return seen_nothing(me, b, l); ++ } ++ ++ HTTRACE(STREAM_TRACE, "Boundary: Processed <CR><LF>\n"); ++ me->state=start_of_line; ++ me->keptcrlf=YES; ++ return 1; ++} ++ ++PRIVATE void process_boundary(HTStream *me, int isterminal) ++{ ++ HTBoundary_flush(me); ++ if (me->target) FREE_TARGET; ++ me->target=NULL; ++ me->state=start_of_line; ++ me->keptcrlf=NO; ++ ++ if (!isterminal) + me->target = HTStreamStack(WWW_MIME,me->format, + HTMerge(me->orig_target, 2), + me->request, YES); +- if (end > start) { +- if ((status = PUTBLOCK(start, end-start)) != HT_OK) +- return status; +- } +- } else { +- if (me->debug) +- if ((status = PUTDEBUG(start, end-start)) != HT_OK) +- return status; +- } +- start = b; +- if (*b == '-') me->dash++; +- me->state = EOL_SLF; +- } else if (*b == CR) { +- me->state = EOL_FCR; +- end = b; +- } else if (*b == LF) { +- if (me->state != EOL_FCR) end = b; +- me->state = EOL_FLF; +- } +- b++; +- } +- return (start<b && me->body) ? PUTBLOCK(start, b-start) : HT_OK; + } + ++ + PRIVATE int HTBoundary_put_string (HTStream * me, const char * s) + { + return HTBoundary_put_block(me, s, (int) strlen(s)); +@@ -133,7 +427,9 @@ + + PRIVATE int HTBoundary_flush (HTStream * me) + { +- return (*me->target->isa->flush)(me->target); ++ if (me->target == NULL) ++ return HT_OK; ++ return (*me->target->isa->flush)(me->target); + } + + PRIVATE int HTBoundary_free (HTStream * me) +@@ -182,18 +478,26 @@ + HTResponse_formatParam(response) : + HTAnchor_formatParam(anchor); + char * boundary = HTAssocList_findObject(type_param, "boundary"); ++ ++ UNUSED(param); ++ UNUSED(input_format); ++ + if (boundary) { + HTStream * me; + if ((me = (HTStream *) HT_CALLOC(1, sizeof(HTStream))) == NULL) + HT_OUTOFMEM("HTBoundary"); + me->isa = &HTBoundaryClass; +- me->request = request; ++ me->net = HTRequest_net(request); ++ me->request = request; + me->format = output_format; + me->orig_target = output_stream; + me->debug = HTRequest_debugStream(request); +- me->state = EOL_FLF; ++ ++ me->state = start_of_line; ++ me->keptcrlf=NO; ++ + StrAllocCopy(me->boundary, boundary); /* Local copy */ +- me->bpos = me->boundary; ++ + HTTRACE(STREAM_TRACE, "Boundary.... Stream created with boundary '%s\'\n" _ me->boundary); + return me; + } else { diff --git a/net-libs/libwww/libwww-5.4.0-r2.ebuild b/net-libs/libwww/libwww-5.4.0-r4.ebuild index 32ca662a7715..ecd9f4b56d18 100644 --- a/net-libs/libwww/libwww-5.4.0-r2.ebuild +++ b/net-libs/libwww/libwww-5.4.0-r4.ebuild @@ -1,8 +1,8 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libwww/libwww-5.4.0-r2.ebuild,v 1.25 2005/02/20 02:01:52 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libwww/libwww-5.4.0-r4.ebuild,v 1.1 2005/10/27 23:31:46 leonardop Exp $ -inherit eutils +inherit eutils multilib MY_P=w3c-${P} DESCRIPTION="A general-purpose client side WEB API" @@ -12,27 +12,38 @@ SRC_URI="http://www.w3.org/Library/Distribution/${MY_P}.tgz LICENSE="W3C" SLOT="0" -KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 ppc-macos s390 sparc x86" -IUSE="ssl mysql" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="mysql ssl" RDEPEND="dev-lang/perl >=sys-libs/zlib-1.1.4 mysql? ( >=dev-db/mysql-3.23.26 ) ssl? ( >=dev-libs/openssl-0.9.6 )" + DEPEND="!dev-libs/9libs >=sys-devel/autoconf-2.13 ${RDEPEND}" S=${WORKDIR}/${MY_P} + src_unpack() { unpack ${A} cd "${S}" + epatch "${FILESDIR}"/${PN}-config-liborder.patch epatch "${WORKDIR}"/${P}-debian-autoconf-2.5.patch epatch "${FILESDIR}"/${P}-autoconf-gentoo.diff epatch "${FILESDIR}"/${P}-automake-gentoo.diff # bug #41959 epatch "${FILESDIR}"/${P}-disable-ndebug-gentoo.diff # bug #50483 + # http://lists.w3.org/Archives/Public/www-lib/2003OctDec/0015.html + # http://www.mysql.gr.jp/mysqlml/mysql/msg/8118 + epatch "${FILESDIR}"/${P}-mysql-4.1.patch + # Fix multiple problems, potentially exploitable (bug #109040) + epatch "${FILESDIR}"/${P}-htbound.patch + + export WANT_AUTOMAKE=1.4 + aclocal || die "aclocal failed" if use ppc-macos ; then glibtoolize -c -f || die "libtoolize failed" @@ -40,28 +51,32 @@ src_unpack() { libtoolize -c -f || die "libtoolize failed" fi - aclocal || die "aclocal failed" autoconf || die "autoconf failed" } src_compile() { + if use mysql ; then + myconf="--with-mysql=/usr/$(get_libdir)/mysql/libmysqlclient.a" + else + myconf="--without-mysql" + fi + econf \ --enable-shared \ --enable-static \ --with-zlib \ --with-md5 \ --with-expat \ - $(use_with mysql) \ $(use_with ssl) \ - || die + ${myconf} || die "./configure failed" emake check-am || die use ppc-macos && echo "#undef HAVE_APPKIT_APPKIT_H" >> wwwconf.h - emake || die + emake || die "Compilation failed" } src_install() { - make DESTDIR="${D}" install || die + make DESTDIR="${D}" install || die "Installation failed" dodoc ChangeLog dohtml -r . } |