Thu May 28 17:58:29 2020
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

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

Key: id Value: 541738

Key: archive Value: 2013-06-01

MESSAGE
DATE 2013-06-15
FROM Ruben Safir
SUBJECT Subject: [NYLXS - HANGOUT] (fwd) Re: HTTP POST for file upload
From owner-hangout-outgoing-at-mrbrklyn.com Sat Jun 15 20:57:26 2013
Return-Path:
X-Original-To: archive-at-mrbrklyn.com
Delivered-To: archive-at-mrbrklyn.com
Received: by mrbrklyn.com (Postfix)
id 1C3AD16114A; Sat, 15 Jun 2013 20:57:26 -0400 (EDT)
Delivered-To: hangout-outgoing-at-mrbrklyn.com
Received: by mrbrklyn.com (Postfix, from userid 28)
id 01E6A16114C; Sat, 15 Jun 2013 20:57:25 -0400 (EDT)
Delivered-To: hangout-at-nylxs.com
Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89])
by mrbrklyn.com (Postfix) with ESMTP id 4FBFB16114A
for ; Sat, 15 Jun 2013 20:57:25 -0400 (EDT)
Received: from panix2.panix.com (panix2.panix.com [166.84.1.2])
by mailbackend.panix.com (Postfix) with ESMTP id BA61E2868F
for ; Sat, 15 Jun 2013 20:57:26 -0400 (EDT)
Received: by panix2.panix.com (Postfix, from userid 20529)
id A636A33C9A; Sat, 15 Jun 2013 20:57:26 -0400 (EDT)
From: Ruben Safir
To: hangout-at-nylxs.com
Subject: [NYLXS - HANGOUT] (fwd) Re: HTTP POST for file upload
User-Agent: tin/2.0.0-20110823 ("Ardenistiel") (UNIX) (NetBSD/5.1.2 (i386))
Message-Id: <20130616005726.A636A33C9A-at-panix2.panix.com>
Date: Sat, 15 Jun 2013 20:57:26 -0400 (EDT)
Sender: owner-hangout-at-mrbrklyn.com
Precedence: bulk
Reply-To: hangout-at-mrbrklyn.com

-- 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!