curl / Mailing Lists / curl-users / Single Mail

curl-users

Re: issue with upload to curl

From: Ray Satiro via curl-users <curl-users_at_cool.haxx.se>
Date: Thu, 11 Jan 2018 16:23:20 -0500

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

-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-01-11