Sat Dec 14 12:03:00 2024
EVENTS
 FREE
SOFTWARE
INSTITUTE

POLITICS
JOBS
MEMBERS'
CORNER

MAILING
LIST

NYLXS Mailing Lists and Archives
NYLXS Members have a lot to say and share but we don't keep many secrets. Join the Hangout Mailing List and say your peice.

DATE 2013-06-01

HANGOUT

2024-12-14 | 2024-11-14 | 2024-10-14 | 2024-09-14 | 2024-08-14 | 2024-07-14 | 2024-06-14 | 2024-05-14 | 2024-04-14 | 2024-03-14 | 2024-02-14 | 2024-01-14 | 2023-12-14 | 2023-11-14 | 2023-10-14 | 2023-09-14 | 2023-08-14 | 2023-07-14 | 2023-06-14 | 2023-05-14 | 2023-04-14 | 2023-03-14 | 2023-02-14 | 2023-01-14 | 2022-12-14 | 2022-11-14 | 2022-10-14 | 2022-09-14 | 2022-08-14 | 2022-07-14 | 2022-06-14 | 2022-05-14 | 2022-04-14 | 2022-03-14 | 2022-02-14 | 2022-01-14 | 2021-12-14 | 2021-11-14 | 2021-10-14 | 2021-09-14 | 2021-08-14 | 2021-07-14 | 2021-06-14 | 2021-05-14 | 2021-04-14 | 2021-03-14 | 2021-02-14 | 2021-01-14 | 2020-12-14 | 2020-11-14 | 2020-10-14 | 2020-09-14 | 2020-08-14 | 2020-07-14 | 2020-06-14 | 2020-05-14 | 2020-04-14 | 2020-03-14 | 2020-02-14 | 2020-01-14 | 2019-12-14 | 2019-11-14 | 2019-10-14 | 2019-09-14 | 2019-08-14 | 2019-07-14 | 2019-06-14 | 2019-05-14 | 2019-04-14 | 2019-03-14 | 2019-02-14 | 2019-01-14 | 2018-12-14 | 2018-11-14 | 2018-10-14 | 2018-09-14 | 2018-08-14 | 2018-07-14 | 2018-06-14 | 2018-05-14 | 2018-04-14 | 2018-03-14 | 2018-02-14 | 2018-01-14 | 2017-12-14 | 2017-11-14 | 2017-10-14 | 2017-09-14 | 2017-08-14 | 2017-07-14 | 2017-06-14 | 2017-05-14 | 2017-04-14 | 2017-03-14 | 2017-02-14 | 2017-01-14 | 2016-12-14 | 2016-11-14 | 2016-10-14 | 2016-09-14 | 2016-08-14 | 2016-07-14 | 2016-06-14 | 2016-05-14 | 2016-04-14 | 2016-03-14 | 2016-02-14 | 2016-01-14 | 2015-12-14 | 2015-11-14 | 2015-10-14 | 2015-09-14 | 2015-08-14 | 2015-07-14 | 2015-06-14 | 2015-05-14 | 2015-04-14 | 2015-03-14 | 2015-02-14 | 2015-01-14 | 2014-12-14 | 2014-11-14 | 2014-10-14 | 2014-09-14 | 2014-08-14 | 2014-07-14 | 2014-06-14 | 2014-05-14 | 2014-04-14 | 2014-03-14 | 2014-02-14 | 2014-01-14 | 2013-12-14 | 2013-11-14 | 2013-10-14 | 2013-09-14 | 2013-08-14 | 2013-07-14 | 2013-06-14 | 2013-05-14 | 2013-04-14 | 2013-03-14 | 2013-02-14 | 2013-01-14 | 2012-12-14 | 2012-11-14 | 2012-10-14 | 2012-09-14 | 2012-08-14 | 2012-07-14 | 2012-06-14 | 2012-05-14 | 2012-04-14 | 2012-03-14 | 2012-02-14 | 2012-01-14 | 2011-12-14 | 2011-11-14 | 2011-10-14 | 2011-09-14 | 2011-08-14 | 2011-07-14 | 2011-06-14 | 2011-05-14 | 2011-04-14 | 2011-03-14 | 2011-02-14 | 2011-01-14 | 2010-12-14 | 2010-11-14 | 2010-10-14 | 2010-09-14 | 2010-08-14 | 2010-07-14 | 2010-06-14 | 2010-05-14 | 2010-04-14 | 2010-03-14 | 2010-02-14 | 2010-01-14 | 2009-12-14 | 2009-11-14 | 2009-10-14 | 2009-09-14 | 2009-08-14 | 2009-07-14 | 2009-06-14 | 2009-05-14 | 2009-04-14 | 2009-03-14 | 2009-02-14 | 2009-01-14 | 2008-12-14 | 2008-11-14 | 2008-10-14 | 2008-09-14 | 2008-08-14 | 2008-07-14 | 2008-06-14 | 2008-05-14 | 2008-04-14 | 2008-03-14 | 2008-02-14 | 2008-01-14 | 2007-12-14 | 2007-11-14 | 2007-10-14 | 2007-09-14 | 2007-08-14 | 2007-07-14 | 2007-06-14 | 2007-05-14 | 2007-04-14 | 2007-03-14 | 2007-02-14 | 2007-01-14 | 2006-12-14 | 2006-11-14 | 2006-10-14 | 2006-09-14 | 2006-08-14 | 2006-07-14 | 2006-06-14 | 2006-05-14 | 2006-04-14 | 2006-03-14 | 2006-02-14 | 2006-01-14 | 2005-12-14 | 2005-11-14 | 2005-10-14 | 2005-09-14 | 2005-08-14 | 2005-07-14 | 2005-06-14 | 2005-05-14 | 2005-04-14 | 2005-03-14 | 2005-02-14 | 2005-01-14 | 2004-12-14 | 2004-11-14 | 2004-10-14 | 2004-09-14 | 2004-08-14 | 2004-07-14 | 2004-06-14 | 2004-05-14 | 2004-04-14 | 2004-03-14 | 2004-02-14 | 2004-01-14 | 2003-12-14 | 2003-11-14 | 2003-10-14 | 2003-09-14 | 2003-08-14 | 2003-07-14 | 2003-06-14 | 2003-05-14 | 2003-04-14 | 2003-03-14 | 2003-02-14 | 2003-01-14 | 2002-12-14 | 2002-11-14 | 2002-10-14 | 2002-09-14 | 2002-08-14 | 2002-07-14 | 2002-06-14 | 2002-05-14 | 2002-04-14 | 2002-03-14 | 2002-02-14 | 2002-01-14 | 2001-12-14 | 2001-11-14 | 2001-10-14 | 2001-09-14 | 2001-08-14 | 2001-07-14 | 2001-06-14 | 2001-05-14 | 2001-04-14 | 2001-03-14 | 2001-02-14 | 2001-01-14 | 2000-12-14 | 2000-11-14 | 2000-10-14 | 2000-09-14 | 2000-08-14 | 2000-07-14 | 2000-06-14 | 2000-05-14 | 2000-04-14 | 2000-03-14 | 2000-02-14 | 2000-01-14 | 1999-12-14

Key: Value:

Key: Value:

MESSAGE
DATE 2013-06-15
FROM Ruben Safir
SUBJECT Subject: [NYLXS - HANGOUT] (fwd) Re: HTTP POST for file upload
-- forwarded message --
Path: reader1.panix.com!panix!bloom-beacon.mit.edu!micro-heart-of-gold.mit.edu!nntp.club.cc.cmu.edu!198.15.118.135.MISMATCH!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: Josef Moellers
Newsgroups: comp.os.linux.networking
Subject: Re: HTTP POST for file upload
Date: Thu, 06 Jun 2013 21:26:55 +0200
Lines: 58
Message-ID:
References:
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: individual.net UNT14A4a6G6gVm+jrsgq4wudVwtFnVfyim3KMiYvM4IAHkTYsf
Cancel-Lock: sha1:oKylhZgr3yzLuhT9gci6U2dhjdA=
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130510 Thunderbird/17.0.6
In-Reply-To:
X-Enigmail-Version: 1.5.1
Xref: panix comp.os.linux.networking:496449

On 06/05/2013 07:40 PM, Josef Moellers wrote:
> Hi,
>
> I'm trying to extend an application to upload result files to a web
> server using HTMP POST. By and large it works but the last couple of
> bytes (the last line, to be precise) does not show up in the received
> data. Maybe someone more knowing than I has an idea what I'm doing wrong.

I found the solution in RFC 1341
(:

7.2.1 Multipart: The common syntax
:
Note that the encapsulation boundary must occur at the beginning of a
line, i.e., following a CRLF, and that that initial CRLF is considered
to be part of the encapsulation boundary rather than part of the
preceding part.
:

So I changed my code to

> snprintf(boundary, sizeof(boundary),
> "WebKitFormBoundaryePkpFF7tjBAqx29L");
> content_length = 0;
> content_length += fprintf(tmpfp, "\r\n------%s\r\n", boundary);
> content_length += fprintf(tmpfp, "Content-Disposition: form-data;
> name=\"archive_name\"\r\n");
> content_length += fprintf(tmpfp, "\r\n");
> content_length += fprintf(tmpfp, "%s", archive_name);
> content_length += fprintf(tmpfp, "\r\n------%s\r\n", boundary);
> content_length += fprintf(tmpfp, "Content-Disposition: form-data;
> name=\"destination_name\"\r\n");
> content_length += fprintf(tmpfp, "\r\n");
> content_length += fprintf(tmpfp, "%s", remote_name);
> content_length += fprintf(tmpfp, "\r\n------%s\r\n", boundary);
> content_length += fprintf(tmpfp, "Content-Disposition: form-data;
> name=\"file_contents\"; filename=\"%s\"\r\n", local_name);
> content_length += fprintf(tmpfp, "Content-Type:
> application/x-object\r\n");
> content_length += fprintf(tmpfp, "\r\n");
> while ((nread = fread(buffer, 1, sizeof(buffer), src)) > 0)
> {
> fwrite(buffer, 1, nread, tmpfp);
> content_length += nread;
> }
> content_length += fprintf(tmpfp, "\r\n------%s--\r\n", boundary);

Apparently the Perl CGI code was tolerant and took the "}\n" as the CRLF
preceding the last boundary and dropped that!

Another problem, not related to this one, was that I had to explicitly
close the write side of the socket in order to reliably receive the
response.

Thanks for both who helped (and all who thought about the issue).

Josef

-- end of forwarded message --

  1. 2013-06-02 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Re: Pharmacy Help (Bed-Sty)
  2. 2013-06-04 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) NY Mets Finances
  3. 2013-06-04 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Linux on the desktop
  4. 2013-06-05 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [ruben-at-mrbrklyn.com: Gerrymandering]
  5. 2013-06-06 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] hardware repair
  6. 2013-06-06 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] hardware repair
  7. 2013-06-06 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  8. 2013-06-06 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  9. 2013-06-07 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] hardware repair
  10. 2013-06-07 Ruben <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Be Happy - we aren't on verizon
  11. 2013-06-07 Ruben <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Be Happy - we aren't on verizon
  12. 2013-06-07 Ruben <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Be Happy - we aren't on verizon
  13. 2013-06-07 Ruben <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Be Happy - we aren't on verizon
  14. 2013-06-07 Ruben <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] your phone service and you
  15. 2013-06-07 einker <eminker-at-gmail.com> Re: [NYLXS - HANGOUT] your phone service and you
  16. 2013-06-07 Ruben <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] your phone service and you
  17. 2013-06-07 Ruben <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Put your business in the cloud!
  18. 2013-06-08 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  19. 2013-06-08 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  20. 2013-06-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  21. 2013-06-09 Robert Menes <viewtiful.icchan-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  22. 2013-06-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  23. 2013-06-09 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  24. 2013-06-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  25. 2013-06-09 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  26. 2013-06-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  27. 2013-06-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  28. 2013-06-09 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  29. 2013-06-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  30. 2013-06-09 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  31. 2013-06-09 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  32. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  33. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [ruben-at-mrbrklyn.com: Re: sort bug?]
  34. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] [ruben-at-mrbrklyn.com: Re: sort bug?]
  35. 2013-06-10 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  36. 2013-06-10 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  37. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  38. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  39. 2013-06-10 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  40. 2013-06-10 einker <eminker-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  41. 2013-06-10 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  42. 2013-06-10 Kevin Mark <kevin.mark-at-verizon.net> Re: [NYLXS - HANGOUT] hardware repair
  43. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  44. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  45. 2013-06-10 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  46. 2013-06-11 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  47. 2013-06-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  48. 2013-06-11 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  49. 2013-06-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  50. 2013-06-11 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  51. 2013-06-11 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] html problem
  52. 2013-06-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  53. 2013-06-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] html problem
  54. 2013-06-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  55. 2013-06-11 Paul Robert Marino <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] hardware repair
  56. 2013-06-11 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] hardware repair
  57. 2013-06-13 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] televsion content wars
  58. 2013-06-13 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Troubles with hotel arraingments
  59. 2013-06-14 eminker-at-gmail.com Re: [NYLXS - HANGOUT] Troubles with hotel arraingments
  60. 2013-06-14 eminker-at-gmail.com Re: [NYLXS - HANGOUT] Troubles with hotel arraingments
  61. 2013-06-14 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Troubles with hotel arraingments
  62. 2013-06-14 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Troubles with hotel arraingments
  63. 2013-06-14 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Troubles with hotel arraingments
  64. 2013-06-14 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] Troubles with hotel arraingments
  65. 2013-06-14 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] secure mail - and security
  66. 2013-06-15 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: question about forwarding and sysfs entries
  67. 2013-06-15 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) HTTP POST for file upload
  68. 2013-06-15 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] (fwd) Re: HTTP POST for file upload
  69. 2013-06-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] fishing dates
  70. 2013-06-16 Ruben <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] So while you were away this weekend
  71. 2013-06-16 Ruben <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Fwd: Re: [NYLXS] Secure your email. Get your own email server and...
  72. 2013-06-16 Ruben <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] So while you were away this weekend
  73. 2013-06-16 Ruben <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] So while you were away this weekend
  74. 2013-06-16 Ruben <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] So while you were away this weekend
  75. 2013-06-16 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] biometrics - I can see you!!
  76. 2013-06-20 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] image galleries for the web
  77. 2013-06-21 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] image galleries - a REAL HACK
  78. 2013-06-21 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] A little fraud never hurt anyone
  79. 2013-06-21 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] github
  80. 2013-06-21 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] employment help
  81. 2013-06-23 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] kill count
  82. 2013-06-23 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] kill count
  83. 2013-06-25 Ruben Safir <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] what is the government doing?
  84. 2013-06-27 From: "Michael L. Richardson" <mlr52-at-michaellrichardson.com> Subject: [NYLXS - HANGOUT] Any thoughts on this, Sacramento State 8008 computer, the world's-first
  85. 2013-06-28 Ruben <mrbrklyn-at-panix.com> Subject: [NYLXS - HANGOUT] Fwd: New job Kansas City Perl developer roles available
  86. 2013-06-28 einker <eminker-at-gmail.com> Subject: [NYLXS - HANGOUT] MySQL mistake is a wake-up call on open source ownership
  87. 2013-06-30 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] MySQL mistake is a wake-up call on open
  88. 2013-06-30 Ruben Safir <mrbrklyn-at-panix.com> Re: [NYLXS - HANGOUT] MySQL mistake is a wake-up call on open
  89. 2013-06-30 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] MySQL mistake is a wake-up call on open source ownership
  90. 2013-06-30 From: "Paul Robert Marino" <prmarino1-at-gmail.com> Re: [NYLXS - HANGOUT] MySQL mistake is a wake-up call on open source ownership

NYLXS are Do'ers and the first step of Doing is Joining! Join NYLXS and make a difference in your community today!