Fri Nov 22 00:29:28 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-11-22 | 2024-10-22 | 2024-09-22 | 2024-08-22 | 2024-07-22 | 2024-06-22 | 2024-05-22 | 2024-04-22 | 2024-03-22 | 2024-02-22 | 2024-01-22 | 2023-12-22 | 2023-11-22 | 2023-10-22 | 2023-09-22 | 2023-08-22 | 2023-07-22 | 2023-06-22 | 2023-05-22 | 2023-04-22 | 2023-03-22 | 2023-02-22 | 2023-01-22 | 2022-12-22 | 2022-11-22 | 2022-10-22 | 2022-09-22 | 2022-08-22 | 2022-07-22 | 2022-06-22 | 2022-05-22 | 2022-04-22 | 2022-03-22 | 2022-02-22 | 2022-01-22 | 2021-12-22 | 2021-11-22 | 2021-10-22 | 2021-09-22 | 2021-08-22 | 2021-07-22 | 2021-06-22 | 2021-05-22 | 2021-04-22 | 2021-03-22 | 2021-02-22 | 2021-01-22 | 2020-12-22 | 2020-11-22 | 2020-10-22 | 2020-09-22 | 2020-08-22 | 2020-07-22 | 2020-06-22 | 2020-05-22 | 2020-04-22 | 2020-03-22 | 2020-02-22 | 2020-01-22 | 2019-12-22 | 2019-11-22 | 2019-10-22 | 2019-09-22 | 2019-08-22 | 2019-07-22 | 2019-06-22 | 2019-05-22 | 2019-04-22 | 2019-03-22 | 2019-02-22 | 2019-01-22 | 2018-12-22 | 2018-11-22 | 2018-10-22 | 2018-09-22 | 2018-08-22 | 2018-07-22 | 2018-06-22 | 2018-05-22 | 2018-04-22 | 2018-03-22 | 2018-02-22 | 2018-01-22 | 2017-12-22 | 2017-11-22 | 2017-10-22 | 2017-09-22 | 2017-08-22 | 2017-07-22 | 2017-06-22 | 2017-05-22 | 2017-04-22 | 2017-03-22 | 2017-02-22 | 2017-01-22 | 2016-12-22 | 2016-11-22 | 2016-10-22 | 2016-09-22 | 2016-08-22 | 2016-07-22 | 2016-06-22 | 2016-05-22 | 2016-04-22 | 2016-03-22 | 2016-02-22 | 2016-01-22 | 2015-12-22 | 2015-11-22 | 2015-10-22 | 2015-09-22 | 2015-08-22 | 2015-07-22 | 2015-06-22 | 2015-05-22 | 2015-04-22 | 2015-03-22 | 2015-02-22 | 2015-01-22 | 2014-12-22 | 2014-11-22 | 2014-10-22 | 2014-09-22 | 2014-08-22 | 2014-07-22 | 2014-06-22 | 2014-05-22 | 2014-04-22 | 2014-03-22 | 2014-02-22 | 2014-01-22 | 2013-12-22 | 2013-11-22 | 2013-10-22 | 2013-09-22 | 2013-08-22 | 2013-07-22 | 2013-06-22 | 2013-05-22 | 2013-04-22 | 2013-03-22 | 2013-02-22 | 2013-01-22 | 2012-12-22 | 2012-11-22 | 2012-10-22 | 2012-09-22 | 2012-08-22 | 2012-07-22 | 2012-06-22 | 2012-05-22 | 2012-04-22 | 2012-03-22 | 2012-02-22 | 2012-01-22 | 2011-12-22 | 2011-11-22 | 2011-10-22 | 2011-09-22 | 2011-08-22 | 2011-07-22 | 2011-06-22 | 2011-05-22 | 2011-04-22 | 2011-03-22 | 2011-02-22 | 2011-01-22 | 2010-12-22 | 2010-11-22 | 2010-10-22 | 2010-09-22 | 2010-08-22 | 2010-07-22 | 2010-06-22 | 2010-05-22 | 2010-04-22 | 2010-03-22 | 2010-02-22 | 2010-01-22 | 2009-12-22 | 2009-11-22 | 2009-10-22 | 2009-09-22 | 2009-08-22 | 2009-07-22 | 2009-06-22 | 2009-05-22 | 2009-04-22 | 2009-03-22 | 2009-02-22 | 2009-01-22 | 2008-12-22 | 2008-11-22 | 2008-10-22 | 2008-09-22 | 2008-08-22 | 2008-07-22 | 2008-06-22 | 2008-05-22 | 2008-04-22 | 2008-03-22 | 2008-02-22 | 2008-01-22 | 2007-12-22 | 2007-11-22 | 2007-10-22 | 2007-09-22 | 2007-08-22 | 2007-07-22 | 2007-06-22 | 2007-05-22 | 2007-04-22 | 2007-03-22 | 2007-02-22 | 2007-01-22 | 2006-12-22 | 2006-11-22 | 2006-10-22 | 2006-09-22 | 2006-08-22 | 2006-07-22 | 2006-06-22 | 2006-05-22 | 2006-04-22 | 2006-03-22 | 2006-02-22 | 2006-01-22 | 2005-12-22 | 2005-11-22 | 2005-10-22 | 2005-09-22 | 2005-08-22 | 2005-07-22 | 2005-06-22 | 2005-05-22 | 2005-04-22 | 2005-03-22 | 2005-02-22 | 2005-01-22 | 2004-12-22 | 2004-11-22 | 2004-10-22 | 2004-09-22 | 2004-08-22 | 2004-07-22 | 2004-06-22 | 2004-05-22 | 2004-04-22 | 2004-03-22 | 2004-02-22 | 2004-01-22 | 2003-12-22 | 2003-11-22 | 2003-10-22 | 2003-09-22 | 2003-08-22 | 2003-07-22 | 2003-06-22 | 2003-05-22 | 2003-04-22 | 2003-03-22 | 2003-02-22 | 2003-01-22 | 2002-12-22 | 2002-11-22 | 2002-10-22 | 2002-09-22 | 2002-08-22 | 2002-07-22 | 2002-06-22 | 2002-05-22 | 2002-04-22 | 2002-03-22 | 2002-02-22 | 2002-01-22 | 2001-12-22 | 2001-11-22 | 2001-10-22 | 2001-09-22 | 2001-08-22 | 2001-07-22 | 2001-06-22 | 2001-05-22 | 2001-04-22 | 2001-03-22 | 2001-02-22 | 2001-01-22 | 2000-12-22 | 2000-11-22 | 2000-10-22 | 2000-09-22 | 2000-08-22 | 2000-07-22 | 2000-06-22 | 2000-05-22 | 2000-04-22 | 2000-03-22 | 2000-02-22 | 2000-01-22 | 1999-12-22

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!