Using nuget.exe
via mono
on Mac OS X Yosemite (10.10.3) appears to produce an HTTP PUT request that is missing a carriage-return (CR) just before the final multipart boundary.
mono installed via brew
mono: stable 4.0.1.44 (bottled)
nuget.exe version
NuGet Version: 2.8.60318.667
the following push command
mono nuget.exe push SimplePackage.1.0.0.nupkg -source nuget-hosted
Produces the following multipart content which was captured via Charles
PUT /repository/nuget-hosted/ HTTP/1.0
User-Agent: NuGet Command Line/2.8.60318.667 (Unix 14.3.0.0)
X-NuGet-ApiKey: 79982994-af3c-3bb8-a74f-17e1df492a89
Content-Type: multipart/form-data; boundary=---------------------------8d273112e43fb92
Content-Length: 2371
Host: 127.0.0.1:8081
00000000 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
00000010 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 38 64 32 -------------8d2
00000020 37 33 31 31 32 65 34 33 66 62 39 32 0d 0a 43 6f 73112e43fb92 Co
00000030 6e 74 65 6e 74 2d 44 69 73 70 6f 73 69 74 69 6f ntent-Dispositio
00000040 6e 3a 20 66 6f 72 6d 2d 64 61 74 61 3b 20 6e 61 n: form-data; na
00000050 6d 65 3d 22 70 61 63 6b 61 67 65 22 3b 20 66 69 me="package"; fi
00000060 6c 65 6e 61 6d 65 3d 22 70 61 63 6b 61 67 65 22 lename="package"
00000070 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 Content-Type:
00000080 61 70 70 6c 69 63 61 74 69 6f 6e 2f 6f 63 74 65 application/octe
00000090 74 2d 73 74 72 65 61 6d 0d 0a 0d 0a 50 4b 03 04 t-stream PK
000000a0 14 00 00 00 00 00 ee 40 19 50 33 29 50 0a a6 01 @ P3)P
000000b0 00 00 a6 01 00 00 0b 00 00 00 5f 72 65 6c 73 2f _rels/
000000c0 2e 72 65 6c 73 ef bb bf 3c 3f 78 6d 6c 20 76 65 .rels <?xml ve
000000d0 72 73 69 6f 6e 3d 22 31 2e 30 22 3f 3e 3c 52 65 rsion="1.0"?><Re
000000e0 6c 61 74 69 6f 6e 73 68 69 70 73 20 78 6d 6c 6e lationships xmln
000000f0 73 3d 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 s="http://schema
00000100 73 2e 6f 70 65 6e 78 6d 6c 66 6f 72 6d 61 74 73 s.openxmlformats
00000110 2e 6f 72 67 2f 70 61 63 6b 61 67 65 2f 32 30 30 .org/package/200
00000120 36 2f 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 22 6/relationships"
00000130 3e 3c 52 65 6c 61 74 69 6f 6e 73 68 69 70 20 49 ><Relationship I
00000140 64 3d 22 52 65 30 22 20 54 61 72 67 65 74 3d 22 d="Re0" Target="
00000150 2f 53 69 6d 70 6c 65 50 61 63 6b 61 67 65 2e 6e /SimplePackage.n
00000160 75 73 70 65 63 22 20 54 79 70 65 3d 22 68 74 74 uspec" Type="htt
00000170 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6d 69 63 72 p://schemas.micr
00000180 6f 73 6f 66 74 2e 63 6f 6d 2f 70 61 63 6b 61 67 osoft.com/packag
00000190 69 6e 67 2f 32 30 31 30 2f 30 37 2f 6d 61 6e 69 ing/2010/07/mani
000001a0 66 65 73 74 22 20 2f 3e 3c 52 65 6c 61 74 69 6f fest" /><Relatio
000001b0 6e 73 68 69 70 20 49 64 3d 22 52 65 31 22 20 54 nship Id="Re1" T
000001c0 61 72 67 65 74 3d 22 2f 70 61 63 6b 61 67 65 2f arget="/package/
000001d0 73 65 72 76 69 63 65 73 2f 6d 65 74 61 64 61 74 services/metadat
000001e0 61 2f 63 6f 72 65 2d 70 72 6f 70 65 72 74 69 65 a/core-propertie
000001f0 73 2f 31 2e 70 73 6d 64 63 70 22 20 54 79 70 65 s/1.psmdcp" Type
00000200 3d 22 68 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 ="http://schemas
00000210 2e 6f 70 65 6e 78 6d 6c 66 6f 72 6d 61 74 73 2e .openxmlformats.
00000220 6f 72 67 2f 70 61 63 6b 61 67 65 2f 32 30 30 36 org/package/2006
00000230 2f 72 65 6c 61 74 69 6f 6e 73 68 69 70 73 2f 6d /relationships/m
00000240 65 74 61 64 61 74 61 2f 63 6f 72 65 2d 70 72 6f etadata/core-pro
00000250 70 65 72 74 69 65 73 22 20 2f 3e 3c 2f 52 65 6c perties" /></Rel
00000260 61 74 69 6f 6e 73 68 69 70 73 3e 50 4b 03 04 14 ationships>PK
00000270 00 02 00 08 00 1e 43 19 50 3a 26 b1 df a6 01 00 C P:&
00000280 00 53 03 00 00 14 00 00 00 53 69 6d 70 6c 65 50 S SimpleP
00000290 61 63 6b 61 67 65 2e 6e 75 73 70 65 63 85 53 c1 ackage.nuspec S
000002a0 4e e3 30 14 bc f3 15 56 ee c4 2d d2 4a 08 b9 46 N 0 V - J F
000002b0 ab 62 89 ae a2 16 35 e5 1c 19 fb 35 31 c4 76 b0 b 5 51 v
000002c0 9d 5d fa 6d 7b d8 4f da 5f 58 07 27 10 90 56 5c ] m{ O _X ' V\
000002d0 a2 bc 99 79 e3 e7 97 c9 df df 7f c8 f5 8b 6e d1 y n
000002e0 4f 70 5e 59 b3 ca 96 f9 22 43 60 84 95 ca d4 ab Op^Y "C`
000002f0 ac 0f c7 f3 cb ec 9a 9e 91 8e 8b 27 5e 03 8a 6a '^ j
00000300 e3 57 59 13 42 77 85 b1 17 0d 68 ee 73 ad 84 b3 WY Bw h s
00000310 de 1e 43 2e ac c6 49 1b 0d f0 c5 62 b9 c4 8b 4b C. I b K
00000320 6c 7a df 81 c8 5f bc cc e8 19 42 44 43 e0 92 07 lz _ BDC
00000330 3e 14 b1 54 92 96 4a 77 2d dc a5 53 08 8e 48 a2 > T Jw- S H
00000340 c6 c9 68 1c 2c 5f 10 3c 95 89 e4 7d 68 ac f3 f4 h ,_ < }h
00000350 c1 71 f9 00 e2 89 e0 09 49 bc fd 65 e0 03 3d 02 q I e =
00000360 89 6d 95 00 e3 e1 de b5 74 bc 4e b1 59 b3 6d c9 m t N Y m
00000370 aa fb 7d 51 dd b2 3d ab 76 fb ea 86 15 ec c0 aa }Q = v
00000380 c3 ed a6 ac 8a cd 96 11 3c eb 4b 46 9d b3 8f 20 < KF
00000390 c2 cc e8 6e bf fb c1 d6 87 2f 8c 66 7d e3 1e 84 n / f}
000003a0 35 33 97 cd 7a b7 fd c2 62 ea 48 fd 0e 9e 7b e5 53 z b H {
000003b0 a0 48 03 7e 17 02 ba c0 8d 00 7a e4 ad 8f 5b fd H ~ z [
000003c0 2f 9f da 25 78 e1 54 17 86 05 8f 5f 02 cd 30 82 / %x T _ 0
000003d0 e7 82 e9 c4 16 b8 87 ad 0d e0 69 d9 6b cd dd 09 i k
000003e0 d9 23 12 0d 37 35 78 a4 b9 04 a4 0c 0a 8d f2 68 # 75x h
000003f0 14 0f 7c 68 00 8d 91 ca 87 b9 66 2e c9 58 d8 ee |h f. X
00000400 e4 54 dd 04 ba 9e de 50 4c d3 37 82 df 99 a4 0c T PL 7
00000410 bc f6 f4 c0 eb 25 8a 8f 0b 82 5f eb e9 42 1d 18 % _ B
00000420 19 e3 ac 26 df 39 78 42 4a ae b2 92 0f c1 bb 79 & 9xBJ y
00000430 03 b3 4f 3f 03 1e bd f0 67 33 82 df 53 4c c6 cc O? g3 SL
00000440 03 fd 07 50 4b 03 04 14 00 00 00 00 00 b2 45 19 PK E
00000450 50 a1 9f 60 dd 5f 02 00 00 5f 02 00 00 32 00 00 P ` _ _ 2
00000460 00 70 61 63 6b 61 67 65 2f 73 65 72 76 69 63 65 package/service
00000470 73 2f 6d 65 74 61 64 61 74 61 2f 63 6f 72 65 2d s/metadata/core-
00000480 70 72 6f 70 65 72 74 69 65 73 2f 31 2e 70 73 6d properties/1.psm
00000490 64 63 70 ef bb bf 3c 3f 78 6d 6c 20 76 65 72 73 dcp <?xml vers
000004a0 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 ion="1.0" encodi
000004b0 6e 67 3d 22 55 54 46 2d 38 22 3f 3e 3c 63 6f 72 ng="UTF-8"?><cor
000004c0 65 50 72 6f 70 65 72 74 69 65 73 20 78 6d 6c 6e eProperties xmln
000004d0 73 3a 64 63 3d 22 68 74 74 70 3a 2f 2f 70 75 72 s:dc="http://pur
000004e0 6c 2e 6f 72 67 2f 64 63 2f 65 6c 65 6d 65 6e 74 l.org/dc/element
000004f0 73 2f 31 2e 31 2f 22 20 78 6d 6c 6e 73 3a 64 63 s/1.1/" xmlns:dc
00000500 74 65 72 6d 73 3d 22 68 74 74 70 3a 2f 2f 70 75 terms="http://pu
00000510 72 6c 2e 6f 72 67 2f 64 63 2f 74 65 72 6d 73 2f rl.org/dc/terms/
00000520 22 20 78 6d 6c 6e 73 3a 78 73 69 3d 22 68 74 74 " xmlns:xsi="htt
00000530 70 3a 2f 2f 77 77 77 2e 77 33 2e 6f 72 67 2f 32 p://www.w3.org/2
00000540 30 30 31 2f 58 4d 4c 53 63 68 65 6d 61 2d 69 6e 001/XMLSchema-in
00000550 73 74 61 6e 63 65 22 20 78 6d 6c 6e 73 3d 22 68 stance" xmlns="h
00000560 74 74 70 3a 2f 2f 73 63 68 65 6d 61 73 2e 6f 70 ttp://schemas.op
00000570 65 6e 78 6d 6c 66 6f 72 6d 61 74 73 2e 6f 72 67 enxmlformats.org
00000580 2f 70 61 63 6b 61 67 65 2f 32 30 30 36 2f 6d 65 /package/2006/me
00000590 74 61 64 61 74 61 2f 63 6f 72 65 2d 70 72 6f 70 tadata/core-prop
000005a0 65 72 74 69 65 73 22 3e 3c 64 63 3a 63 72 65 61 erties"><dc:crea
000005b0 74 6f 72 3e 62 72 61 64 62 65 63 6b 3c 2f 64 63 tor>bradbeck</dc
000005c0 3a 63 72 65 61 74 6f 72 3e 3c 64 63 3a 64 65 73 :creator><dc:des
000005d0 63 72 69 70 74 69 6f 6e 3e 50 61 63 6b 61 67 65 cription>Package
000005e0 20 64 65 73 63 72 69 70 74 69 6f 6e 3c 2f 64 63 description</dc
000005f0 3a 64 65 73 63 72 69 70 74 69 6f 6e 3e 3c 64 63 :description><dc
00000600 3a 69 64 65 6e 74 69 66 69 65 72 3e 53 69 6d 70 :identifier>Simp
00000610 6c 65 50 61 63 6b 61 67 65 3c 2f 64 63 3a 69 64 lePackage</dc:id
00000620 65 6e 74 69 66 69 65 72 3e 3c 6b 65 79 77 6f 72 entifier><keywor
00000630 64 73 3e 54 61 67 31 20 54 61 67 32 3c 2f 6b 65 ds>Tag1 Tag2</ke
00000640 79 77 6f 72 64 73 3e 3c 6c 61 73 74 4d 6f 64 69 ywords><lastModi
00000650 66 69 65 64 42 79 3e 4e 75 47 65 74 2c 20 56 65 fiedBy>NuGet, Ve
00000660 72 73 69 6f 6e 3d 32 2e 38 2e 36 30 33 31 38 2e rsion=2.8.60318.
00000670 36 36 37 2c 20 43 75 6c 74 75 72 65 3d 6e 65 75 667, Culture=neu
00000680 74 72 61 6c 2c 20 50 75 62 6c 69 63 4b 65 79 54 tral, PublicKeyT
00000690 6f 6b 65 6e 3d 6e 75 6c 6c 3b 55 6e 69 78 20 31 oken=null;Unix 1
000006a0 34 2e 33 2e 30 2e 30 3b 2e 4e 45 54 20 46 72 61 4.3.0.0;.NET Fra
000006b0 6d 65 77 6f 72 6b 20 34 3c 2f 6c 61 73 74 4d 6f mework 4</lastMo
000006c0 64 69 66 69 65 64 42 79 3e 3c 76 65 72 73 69 6f difiedBy><versio
000006d0 6e 3e 31 2e 30 2e 30 3c 2f 76 65 72 73 69 6f 6e n>1.0.0</version
000006e0 3e 3c 2f 63 6f 72 65 50 72 6f 70 65 72 74 69 65 ></corePropertie
000006f0 73 3e 50 4b 03 04 14 00 02 00 08 00 fc 46 19 50 s>PK F P
00000700 c1 13 c7 c6 bf 00 00 00 74 01 00 00 13 00 00 00 t
00000710 5b 43 6f 6e 74 65 6e 74 5f 54 79 70 65 73 5d 2e [Content_Types].
00000720 78 6d 6c 8d 90 3d 0e c2 30 0c 85 af 12 65 45 6d xml = 0 eEm
00000730 0a 03 03 ea cf 00 dc 80 0b 44 c1 d0 88 36 b1 62 D 6 b
00000740 b7 2a 67 63 e0 48 5c 81 d0 b2 00 12 ea 68 bf e7 *gc H\ h
00000750 ef 3d f9 71 bb e7 d5 d0 36 a2 87 40 d6 bb 42 2e = q 6 @ B.
00000760 d3 4c 56 65 7e b8 22 90 88 8a a3 42 d6 cc b8 51 LVe~ " B Q
00000770 8a 4c 0d ad a6 d4 23 b8 a8 9c 7c 68 35 c7 31 9c L # |h5 1
00000780 15 6a 73 d1 67 50 ab 2c 5b 2b e3 1d 83 e3 84 5f js gP ,[+ _
00000790 0c 59 e6 3b 38 e9 ae 61 b1 9d f6 2f 74 21 35 62 Y ;8 a /t!5b
000007a0 63 8d e6 18 aa 7a 77 fc 82 26 6f 60 1a a0 19 3d c zw &o` =
000007b0 54 5b a4 45 34 48 b1 1f 22 65 2a 1b 55 92 42 cd T[ E4H "e* U B
000007c0 88 f0 86 81 3f 6e 5d 47 08 66 de f5 9f 82 c6 07 ?n]G f
000007d0 48 30 44 35 b0 85 df 8a 48 ed d1 e0 18 a3 c6 a7 H0D5 H
000007e0 96 4f 50 4b 01 02 00 00 14 00 00 00 00 00 ee 40 OPK @
000007f0 19 50 33 29 50 0a a6 01 00 00 a6 01 00 00 0b 00 P3)P
00000800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00000810 5f 72 65 6c 73 2f 2e 72 65 6c 73 50 4b 01 02 00 _rels/.relsPK
00000820 00 14 00 02 00 08 00 1e 43 19 50 3a 26 b1 df a6 C P:&
00000830 01 00 00 53 03 00 00 14 00 00 00 00 00 00 00 01 S
00000840 00 00 00 00 00 cf 01 00 00 53 69 6d 70 6c 65 50 SimpleP
00000850 61 63 6b 61 67 65 2e 6e 75 73 70 65 63 50 4b 01 ackage.nuspecPK
00000860 02 00 00 14 00 00 00 00 00 b2 45 19 50 a1 9f 60 E P `
00000870 dd 5f 02 00 00 5f 02 00 00 32 00 00 00 00 00 00 _ _ 2
00000880 00 01 00 00 00 00 00 a7 03 00 00 70 61 63 6b 61 packa
00000890 67 65 2f 73 65 72 76 69 63 65 73 2f 6d 65 74 61 ge/services/meta
000008a0 64 61 74 61 2f 63 6f 72 65 2d 70 72 6f 70 65 72 data/core-proper
000008b0 74 69 65 73 2f 31 2e 70 73 6d 64 63 70 50 4b 01 ties/1.psmdcpPK
000008c0 02 00 00 14 00 02 00 08 00 fc 46 19 50 c1 13 c7 F P
000008d0 c6 bf 00 00 00 74 01 00 00 13 00 00 00 00 00 00 t
000008e0 00 01 00 00 00 00 00 56 06 00 00 5b 43 6f 6e 74 V [Cont
000008f0 65 6e 74 5f 54 79 70 65 73 5d 2e 78 6d 6c 50 4b ent_Types].xmlPK
00000900 05 06 00 00 00 00 04 00 04 00 1c 01 00 00 46 07 F
00000910 00 00 00 00 0a 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d -----------
00000920 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d ----------------
00000930 2d 2d 38 64 32 37 33 31 31 32 65 34 33 66 62 39 --8d273112e43fb9
00000940 32 2d 2d 2--
In the row 00000910
, I believe the multipart content-type specification (http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html) requires a carriage-return (Ox0d
) and a line-feed (0x0a
) prior to the final boundary which, in this case, starts with -
(0x2d
). But this row contains 00 0a 2d
, which is missing the CR (0d
).
The current implementation of MultipartWebRequest::CreateMultipartRequest
doesn't appear to ensure that there is a CRLF before the closing boundary. It uses Environment.NewLine, which on Unix via mono
, I believe will be just LF and not CRLF as on Windows.