Discussion:
issue with upload to curl
Garcia, Jerry E
2018-01-11 19:59:42 UTC
Permalink
I am having an issue uploading a folder/file to a SharePoint from RedHat, here is the output from the command:

$ /usr/local/bin/curl --ntlm --cacert /data/certs/certRepo --user user:password "https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/start.aspx#/Shared%20Documents/Forms/AllItems.aspx" --upload-file /home/lm446abc/temp/bpmaips-ti01/configValidationReport_DPS-TIAIBPM.html -v
* Trying 137.137.15.139...
* TCP_NODELAY set
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /data/certs/certRepo
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; O=Boeing; OU=servers; CN=collab2.web.boeing.com
* start date: Jun 12 13:22:15 2017 GMT
* expire date: Aug 11 13:22:15 2019 GMT
* subjectAltName: host "collab2.web.boeing.com" matched cert's "collab2.web.boeing.com"
* issuer: C=US; O=Boeing; OU=certservers; CN=Boeing Basic Assurance Software Issuing CA G3
* SSL certificate verify ok.
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/start.aspx HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 0
< HTTP/1.1 401 Unauthorized
< Server: Microsoft-IIS/8.0
< WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADgAAAAGgokCuUJ8Mj0iGm0AAAAAAAAAALIAsgA6AAAABgLwIwAAAA9OVwIABABOAFcAAQAUAEUAUwBTAC0ARQBXAEEALQAyADQABAAiAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQADADgARQBTAFMALQBFAFcAQQAtADIANAAuAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQAFABwAbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAcACAAZaiUYFYvTAQAAAAA=
< SPRequestGuid: 0b8f3f9e-3c4f-303b-cb70-952098710a23
< request-id: 0b8f3f9e-3c4f-303b-cb70-952098710a23
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 2
< SPIisLatency: 1
< WWW-Authenticate: Basic realm="collab2.web.boeing.com"
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Thu, 11 Jan 2018 19:48:03 GMT
< Content-Length: 0
< Set-Cookie: BIGipServercollab2-ew-80-pool=3424160137.20480.0000; path=/
<
* Connection #0 to host collab2.web.boeing.com left intact
* Issue another request to this URL: 'https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/start.aspx'
* Found bundle for host collab2.web.boeing.com: 0xbf1590 [can pipeline]
* Re-using existing connection! (#0) with host collab2.web.boeing.com
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/start.aspx HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAADiAOIAWAAAAAAAAAA6AQAABgAGADoBAAALAAsAQAEAAAAAAAAAAAAABoKJAqgcsOXB1bbOFmRLp0O9v9jaWcsjR9EYo58MTXfq5z0U+7Ic/HxALsQBAQAAAAAAAAAyLBgVi9MB2lnLI0fRGKMAAAAAAgAEAE4AVwABABQARQBTAFMALQBFAFcAQQAtADIANAAEACIAbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAMAOABFAFMAUwAtAEUAVwBBAC0AMgA0AC4AbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAUAHABuAG8AcwAuAGIAbwBlAGkAbgBnAC4AYwBvAG0ABwAIABlqJRgVi9MBAAAAAAAAAABsbTQ0NmFzYmw3MDAwMjUzOA==
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 25898
Expect: 100-continue
< HTTP/1.1 405 Method Not Allowed
< Allow: GET, HEAD, OPTIONS, TRACE
< Server: Microsoft-IIS/8.0
< X-SharePointHealthScore: 0
< SPRequestGuid: 0b8f3f9e-2c52-303b-cb70-90894d4f8dd2
< request-id: 0b8f3f9e-2c52-303b-cb70-90894d4f8dd2
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 26
< SPIisLatency: 0
< Persistent-Auth: true
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Thu, 11 Jan 2018 19:48:03 GMT
< Content-Length: 0
< Connection: close
<
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):

Any ideas as to why it is trying to send the path from the URL instead of the file?

Thanks,

Jerry E. Garcia
Boeing IT, AI Level 3 (A2A, BizTalk, CEERS, DCAC, WPS, MQM, eFDS)
425-234-4049 (Work)
253-670-8974 (cell)
Mail Drop - 7L-65
Hours - 7:00 AM to 3:00 PM PST
Cell Pager: http://webpager.boeing.com/htbin/pagem/?pagee=Jerry.Garcia
Ray Satiro via curl-users
2018-01-11 21:23:20 UTC
Permalink
Post by Garcia, Jerry E
I am having an issue uploading a folder/file to a SharePoint from
 
$ /usr/local/bin/curl --ntlm --cacert /data/certs/certRepo --user
user:password
"https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/start.aspx#/Shared%20Documents/Forms/AllItems.aspx"
--upload-file
/home/lm446abc/temp/bpmaips-ti01/configValidationReport_DPS-TIAIBPM.html
-v
*   Trying 137.137.15.139...
* TCP_NODELAY set
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* ALPN, offering http/1.1
*   CAfile: /data/certs/certRepo
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-SHA384
* ALPN, server did not agree to a protocol
*  subject: C=US; O=Boeing; OU=servers; CN=collab2.web.boeing.com
*  start date: Jun 12 13:22:15 2017 GMT
*  expire date: Aug 11 13:22:15 2019 GMT
*  subjectAltName: host "collab2.web.boeing.com" matched cert's
"collab2.web.boeing.com"
*  issuer: C=US; O=Boeing; OU=certservers; CN=Boeing Basic Assurance
Software Issuing CA G3
*  SSL certificate verify ok.
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/start.aspx HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 0
< HTTP/1.1 401 Unauthorized
< Server: Microsoft-IIS/8.0
< WWW-Authenticate: NTLM
TlRMTVNTUAACAAAAAgACADgAAAAGgokCuUJ8Mj0iGm0AAAAAAAAAALIAsgA6AAAABgLwIwAAAA9OVwIABABOAFcAAQAUAEUAUwBTAC0ARQBXAEEALQAyADQABAAiAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQADADgARQBTAFMALQBFAFcAQQAtADIANAAuAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQAFABwAbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAcACAAZaiUYFYvTAQAAAAA=
< SPRequestGuid: 0b8f3f9e-3c4f-303b-cb70-952098710a23
< request-id: 0b8f3f9e-3c4f-303b-cb70-952098710a23
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 2
< SPIisLatency: 1
< WWW-Authenticate: Basic realm="collab2.web.boeing.com"
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Thu, 11 Jan 2018 19:48:03 GMT
< Content-Length: 0
< Set-Cookie: BIGipServercollab2-ew-80-pool=3424160137.20480.0000; path=/
<
* Connection #0 to host collab2.web.boeing.com left intact
'https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/start.aspx'
* Found bundle for host collab2.web.boeing.com: 0xbf1590 [can pipeline]
* Re-using existing connection! (#0) with host collab2.web.boeing.com
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/start.aspx HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM
TlRMTVNTUAADAAAAGAAYAEAAAADiAOIAWAAAAAAAAAA6AQAABgAGADoBAAALAAsAQAEAAAAAAAAAAAAABoKJAqgcsOXB1bbOFmRLp0O9v9jaWcsjR9EYo58MTXfq5z0U+7Ic/HxALsQBAQAAAAAAAAAyLBgVi9MB2lnLI0fRGKMAAAAAAgAEAE4AVwABABQARQBTAFMALQBFAFcAQQAtADIANAAEACIAbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAMAOABFAFMAUwAtAEUAVwBBAC0AMgA0AC4AbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAUAHABuAG8AcwAuAGIAbwBlAGkAbgBnAC4AYwBvAG0ABwAIABlqJRgVi9MBAAAAAAAAAABsbTQ0NmFzYmw3MDAwMjUzOA==
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 25898
Expect: 100-continue
< HTTP/1.1 405 Method Not Allowed
< Allow: GET, HEAD, OPTIONS, TRACE
< Server: Microsoft-IIS/8.0
< X-SharePointHealthScore: 0
< SPRequestGuid: 0b8f3f9e-2c52-303b-cb70-90894d4f8dd2
< request-id: 0b8f3f9e-2c52-303b-cb70-90894d4f8dd2
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 26
< SPIisLatency: 0
< Persistent-Auth: true
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Thu, 11 Jan 2018 19:48:03 GMT
< Content-Length: 0
< Connection: close
<
* Closing connection 0
 
Any ideas as to why it is trying to send the path from the URL instead of the file?
That's what it's supposed to do. You are requesting to PUT a file on the
server which is to replace the resource from the URL on the server with
the file specified in --upload-file. That looks wrong since you don't
want to replace start.aspx and the server doesn't support the PUT method
for that resource. This could be as simple as finding out which resource
you're supposed to upload the file to or possibly difficult if you need
to check it in [1].

[1]: https://stackoverflow.com/q/13442467
Garcia, Jerry E
2018-01-17 20:03:55 UTC
Permalink
Ok, I understand that this is the way it is supposed to work and I got it to see the correct file to upload. But I am still having an issue with uploading the file to Share Point, getting a:
HTTP/1.1 401 Unauthorized
HTTP/1.1 404 Not Found.

I will add the verbose output:

Here is the curl command:

/usr/local/bin/curl --ntlm --user username:password --upload-file /home/lm446abc/temp/bpmaips-ti01/configValidationReport_DPS-TIAIBPM.html --cacert /data/certs/certRepo https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/Shared%20Documents/Forms/ -v

Here is the ouput from the verbose:

* Trying 137.137.15.139...
* TCP_NODELAY set
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /data/certs/certRepo
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; O=Boeing; OU=servers; CN=collab2.web.boeing.com
* start date: Jun 12 13:22:15 2017 GMT
* expire date: Aug 11 13:22:15 2019 GMT
* subjectAltName: host "collab2.web.boeing.com" matched cert's "collab2.web.boeing.com"
* issuer: C=US; O=Boeing; OU=certservers; CN=Boeing Basic Assurance Software Issuing CA G3
* SSL certificate verify ok.
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/Shared%20Documents/Forms/configValidationReport_DPS-TIAIBPM.html HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 0
< HTTP/1.1 401 Unauthorized
< Server: Microsoft-IIS/8.0
< WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADgAAAAGgokCfCo8Zh6hYLEAAAAAAAAAALIAsgA6AAAABgLwIwAAAA9OVwIABABOAFcAAQAUAEUAUwBTAC0ARQBXAEEALQAyADQABAAiAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQADADgARQBTAFMALQBFAFcAQQAtADIANAAuAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQAFABwAbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAcACAArC5LCsI/TAQAAAAA=
< SPRequestGuid: 3c72419e-cc38-303b-cb70-9fc630c719ff
< request-id: 3c72419e-cc38-303b-cb70-9fc630c719ff
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 2
< SPIisLatency: 1
< WWW-Authenticate: Basic realm="collab2.web.boeing.com"
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Wed, 17 Jan 2018 16:32:25 GMT
< Content-Length: 0
< Set-Cookie: BIGipServercollab2-ew-80-pool=3424160137.20480.0000; path=/
<
* Connection #0 to host collab2.web.boeing.com left intact
* Issue another request to this URL: 'https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/Shared%20Documents/Forms/configValidationReport_DPS-TIAIBPM.html'
* Found bundle for host collab2.web.boeing.com: 0xace530 [can pipeline]
* Re-using existing connection! (#0) with host collab2.web.boeing.com
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/Shared%20Documents/Forms/configValidationReport_DPS-TIAIBPM.html HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAADiAOIAWAAAAAAAAAA6AQAABgAGADoBAAALAAsAQAEAAAAAAAAAAAAABoKJAjWnZEF/rktBUrN9zFb1BDwcv8V7V6zMil0a434QL0U88oG4gJE2INIBAQAAAAAAAAAJQsKwj9MBHL/Fe1eszIoAAAAAAgAEAE4AVwABABQARQBTAFMALQBFAFcAQQAtADIANAAEACIAbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAMAOABFAFMAUwAtAEUAVwBBAC0AMgA0AC4AbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAUAHABuAG8AcwAuAGIAbwBlAGkAbgBnAC4AYwBvAG0ABwAIACsLksKwj9MBAAAAAAAAAABsbTQ0NmFzYmw3MDAwMjUzOA==
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 25898
Expect: 100-continue
< HTTP/1.1 404 Not Found
< Server: Microsoft-IIS/8.0
< X-SharePointHealthScore: 0
< SPRequestGuid: 3c72419e-bc3b-303b-cb70-922d85503444
< request-id: 3c72419e-bc3b-303b-cb70-922d85503444
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 23
< SPIisLatency: 0
< Persistent-Auth: true
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Wed, 17 Jan 2018 16:32:25 GMT
< Content-Length: 0
< Connection: close
<
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):


What am I doing wrong????

Thanks,

Jerry E. Garcia
Boeing IT, AI Level 3 (A2A, BizTalk, CEERS, DCAC, WPS, MQM, eFDS)
425-234-4049 (Work)
253-670-8974 (cell)
Mail Drop - 7L-65
Hours - 7:00 AM to 3:00 PM PST
Cell Pager: http://webpager.boeing.com/htbin/pagem/?pagee=Jerry.Garcia

From: curl-users [mailto:curl-users-***@cool.haxx.se] On Behalf Of Ray Satiro via curl-users
Sent: Thursday, January 11, 2018 1:23 PM
To: curl-***@cool.haxx.se
Cc: Ray Satiro <***@yahoo.com>
Subject: Re: issue with upload to curl

On 1/11/2018 2:59 PM, Garcia, Jerry E wrote:

I am having an issue uploading a folder/file to a SharePoint from RedHat, here is the output from the command:
ᅵ
$ /usr/local/bin/curl --ntlm --cacert /data/certs/certRepo --user user:password "https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/start.aspx#/Shared%20Documents/Forms/AllItems.aspx"<https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/start.aspx#/Shared%20Documents/Forms/AllItems.aspx> --upload-file /home/lm446abc/temp/bpmaips-ti01/configValidationReport_DPS-TIAIBPM.html -v
*ᅵᅵ Trying 137.137.15.139...
* TCP_NODELAY set
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*ᅵᅵ CAfile: /data/certs/certRepo
ᅵ CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
*ᅵ subject: C=US; O=Boeing; OU=servers; CN=collab2.web.boeing.com
*ᅵ start date: Jun 12 13:22:15 2017 GMT
*ᅵ expire date: Aug 11 13:22:15 2019 GMT
*ᅵ subjectAltName: host "collab2.web.boeing.com" matched cert's "collab2.web.boeing.com"
*ᅵ issuer: C=US; O=Boeing; OU=certservers; CN=Boeing Basic Assurance Software Issuing CA G3
*ᅵ SSL certificate verify ok.
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/start.aspx HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 0
< HTTP/1.1 401 Unauthorized
< Server: Microsoft-IIS/8.0
< WWW-Authenticate: NTLM TlRMTVNTUAACAAAAAgACADgAAAAGgokCuUJ8Mj0iGm0AAAAAAAAAALIAsgA6AAAABgLwIwAAAA9OVwIABABOAFcAAQAUAEUAUwBTAC0ARQBXAEEALQAyADQABAAiAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQADADgARQBTAFMALQBFAFcAQQAtADIANAAuAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQAFABwAbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAcACAAZaiUYFYvTAQAAAAA=
< SPRequestGuid: 0b8f3f9e-3c4f-303b-cb70-952098710a23
< request-id: 0b8f3f9e-3c4f-303b-cb70-952098710a23
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 2
< SPIisLatency: 1
< WWW-Authenticate: Basic realm="collab2.web.boeing.com"
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Thu, 11 Jan 2018 19:48:03 GMT
< Content-Length: 0
< Set-Cookie: BIGipServercollab2-ew-80-pool=3424160137.20480.0000; path=/
<
* Connection #0 to host collab2.web.boeing.com left intact
* Issue another request to this URL: 'https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/start.aspx'
* Found bundle for host collab2.web.boeing.com: 0xbf1590 [can pipeline]
* Re-using existing connection! (#0) with host collab2.web.boeing.com
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* Server auth using NTLM with user 'lm446a'
PUT /sites/BPMOps/_layouts/15/start.aspx HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAEAAAADiAOIAWAAAAAAAAAA6AQAABgAGADoBAAALAAsAQAEAAAAAAAAAAAAABoKJAqgcsOXB1bbOFmRLp0O9v9jaWcsjR9EYo58MTXfq5z0U+7Ic/HxALsQBAQAAAAAAAAAyLBgVi9MB2lnLI0fRGKMAAAAAAgAEAE4AVwABABQARQBTAFMALQBFAFcAQQAtADIANAAEACIAbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAMAOABFAFMAUwAtAEUAVwBBAC0AMgA0AC4AbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAUAHABuAG8AcwAuAGIAbwBlAGkAbgBnAC4AYwBvAG0ABwAIABlqJRgVi9MBAAAAAAAAAABsbTQ0NmFzYmw3MDAwMjUzOA==
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 25898
Expect: 100-continue
< HTTP/1.1 405 Method Not Allowed
< Allow: GET, HEAD, OPTIONS, TRACE
< Server: Microsoft-IIS/8.0
< X-SharePointHealthScore: 0
< SPRequestGuid: 0b8f3f9e-2c52-303b-cb70-90894d4f8dd2
< request-id: 0b8f3f9e-2c52-303b-cb70-90894d4f8dd2
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 26
< SPIisLatency: 0
< Persistent-Auth: true
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Thu, 11 Jan 2018 19:48:03 GMT
< Content-Length: 0
< Connection: close
<
* Closing connection 0
* TLSv1.2 (OUT), TLS alert, Client hello (1):
ᅵ
Any ideas as to why it is trying to send the path from the URL instead of the file?

That's what it's supposed to do. You are requesting to PUT a file on the server which is to replace the resource from the URL on the server with the file specified in --upload-file. That looks wrong since you don't want to replace start.aspx and the server doesn't support the PUT method for that resource. This could be as simple as finding out which resource you're supposed to upload the file to or possibly difficult if you need to check it in [1].

[1]: https://stackoverflow.com/q/13442467
Ray Satiro via curl-users
2018-01-19 08:32:40 UTC
Permalink
Post by Garcia, Jerry E
Ok, I understand that this is the way it is supposed to work and I got
it to see the correct file to upload.  But I am still having an issue
HTTP/1.1 401 Unauthorized
HTTP/1.1 404 Not Found.
 
 
 
/usr/local/bin/curl --ntlm --user username:password --upload-file
/home/lm446abc/temp/bpmaips-ti01/configValidationReport_DPS-TIAIBPM.html
--cacert /data/certs/certRepo
https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/Shared%20Documents/Forms/
-v
 
 
*   Trying 137.137.15.139...
* TCP_NODELAY set
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* ALPN, offering http/1.1
*   CAfile: /data/certs/certRepo
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-SHA384
* ALPN, server did not agree to a protocol
*  subject: C=US; O=Boeing; OU=servers; CN=collab2.web.boeing.com
*  start date: Jun 12 13:22:15 2017 GMT
*  expire date: Aug 11 13:22:15 2019 GMT
*  subjectAltName: host "collab2.web.boeing.com" matched cert's
"collab2.web.boeing.com"
*  issuer: C=US; O=Boeing; OU=certservers; CN=Boeing Basic Assurance
Software Issuing CA G3
*  SSL certificate verify ok.
* Server auth using NTLM with user 'lm446a'
PUT
/sites/BPMOps/_layouts/15/Shared%20Documents/Forms/configValidationReport_DPS-TIAIBPM.html
HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM TlRMTVNTUAABAAAABoIIAAAAAAAAAAAAAAAAAAAAAAA=
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 0
< HTTP/1.1 401 Unauthorized
< Server: Microsoft-IIS/8.0
< WWW-Authenticate: NTLM
TlRMTVNTUAACAAAAAgACADgAAAAGgokCfCo8Zh6hYLEAAAAAAAAAALIAsgA6AAAABgLwIwAAAA9OVwIABABOAFcAAQAUAEUAUwBTAC0ARQBXAEEALQAyADQABAAiAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQADADgARQBTAFMALQBFAFcAQQAtADIANAAuAG4AdwAuAG4AbwBzAC4AYgBvAGUAaQBuAGcALgBjAG8AbQAFABwAbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAcACAArC5LCsI/TAQAAAAA=
< SPRequestGuid: 3c72419e-cc38-303b-cb70-9fc630c719ff
< request-id: 3c72419e-cc38-303b-cb70-9fc630c719ff
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 2
< SPIisLatency: 1
< WWW-Authenticate: Basic realm="collab2.web.boeing.com"
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Wed, 17 Jan 2018 16:32:25 GMT
< Content-Length: 0
< Set-Cookie: BIGipServercollab2-ew-80-pool=3424160137.20480.0000; path=/
<
* Connection #0 to host collab2.web.boeing.com left intact
'https://collab2.web.boeing.com/sites/BPMOps/_layouts/15/Shared%20Documents/Forms/configValidationReport_DPS-TIAIBPM.html'
* Found bundle for host collab2.web.boeing.com: 0xace530 [can pipeline]
* Re-using existing connection! (#0) with host collab2.web.boeing.com
* Connected to collab2.web.boeing.com (137.137.15.139) port 443 (#0)
* Server auth using NTLM with user 'lm446a'
PUT
/sites/BPMOps/_layouts/15/Shared%20Documents/Forms/configValidationReport_DPS-TIAIBPM.html
HTTP/1.1
Host: collab2.web.boeing.com
Authorization: NTLM
TlRMTVNTUAADAAAAGAAYAEAAAADiAOIAWAAAAAAAAAA6AQAABgAGADoBAAALAAsAQAEAAAAAAAAAAAAABoKJAjWnZEF/rktBUrN9zFb1BDwcv8V7V6zMil0a434QL0U88oG4gJE2INIBAQAAAAAAAAAJQsKwj9MBHL/Fe1eszIoAAAAAAgAEAE4AVwABABQARQBTAFMALQBFAFcAQQAtADIANAAEACIAbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAMAOABFAFMAUwAtAEUAVwBBAC0AMgA0AC4AbgB3AC4AbgBvAHMALgBiAG8AZQBpAG4AZwAuAGMAbwBtAAUAHABuAG8AcwAuAGIAbwBlAGkAbgBnAC4AYwBvAG0ABwAIACsLksKwj9MBAAAAAAAAAABsbTQ0NmFzYmw3MDAwMjUzOA==
User-Agent: curl/7.58.0-DEV
Accept: */*
Content-Length: 25898
Expect: 100-continue
< HTTP/1.1 404 Not Found
< Server: Microsoft-IIS/8.0
< X-SharePointHealthScore: 0
< SPRequestGuid: 3c72419e-bc3b-303b-cb70-922d85503444
< request-id: 3c72419e-bc3b-303b-cb70-922d85503444
< X-FRAME-OPTIONS: SAMEORIGIN
< SPRequestDuration: 23
< SPIisLatency: 0
< Persistent-Auth: true
< X-Powered-By: ASP.NET
< MicrosoftSharePointTeamServices: 15.0.0.4737
< X-Content-Type-Options: nosniff
< X-MS-InvokeApp: 1; RequireReadOnly
< Date: Wed, 17 Jan 2018 16:32:25 GMT
< Content-Length: 0
< Connection: close
<
* Closing connection 0
 
 
What am I doing wrong????
Please don't top-post it makes the conversation hard to follow [1]. The
initial 401 unauthorized is expected, it includes an auth challenge that
curl then fulfills on the subsequent request. Why the server's response
to that request is 404 not found I really don't know, that's something
you'd have to ask them. It's possible PUT is just not allowed.

[1]: https://curl.haxx.se/mail/etiquette.html#Do_Not_Top_Post
Norton, Mike
2018-01-19 17:00:43 UTC
Permalink
Based on my basic experience with SharePoint, I think you've still not got the correct URI. It looks like you've got the URI from the GUI, not the URI of the actual file. I'm guessing you probably want something like this: https://collab2.web.boeing.com/sites/BPMOps/Shared%20Documents/configValidationReport_DPS-TIAIBPM.html

-mn

Loading...