Re: Bug in HTTP::Request::Common CHECK_BOUNDARY ?

Randal L. Schwartz (merlyn@stonehenge.com)
18 Jun 1999 07:10:40 -0700


>>>>> "Antoine" == Antoine Bertier <antoine.bertier@axa.com> writes:

Antoine> Hello,
Antoine> I have problems with using HTTP::Request::Common to post files on a web
Antoine> site. It seems that the selected boundary (000 by default) is not
Antoine> checked correctly for existence in the transmitted parts. Since 000 is
Antoine> often found in HTML files as a color specification this causes problems.

Antoine> I think in CHECK_BOUNDARY the check must be on $boundary  not on
Antoine> "--$boundary" which is the boundary line the standard specifies and not
Antoine> the boundary itself.

Antoine> So I would suggest to replace:
Antoine>   if (index($_, "--$boundary") >= 0) {
Antoine> by
Antoine>   if (index($_, "$boundary") >= 0) {

I suppose this would be to work around a *broken* webserver that
*incorrectly* triggered when $boundary was seen (a violation of RFCs),
rather than when "--$boundary" was seen.

Why don't you post the name of the broken webserver?  Then we can
decide how bad the problem is worth working around. :)

-- 
Name: Randal L. Schwartz / Stonehenge Consulting Services (503)777-0095
Keywords: Perl training, UNIX[tm] consulting, video production, skiing, flying
Email: <merlyn@stonehenge.com> Snail: (Call) PGP-Key: (finger merlyn@teleport.com)
Web: <A HREF="http://www.stonehenge.com/merlyn/">My Home Page!</A>
Quote: "I'm telling you, if I could have five lines in my .sig, I would!" -- me