Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

411 error with NTLM auth from Windows #58

Closed
larrykluger opened this issue Apr 12, 2014 · 7 comments
Closed

411 error with NTLM auth from Windows #58

larrykluger opened this issue Apr 12, 2014 · 7 comments

Comments

@larrykluger
Copy link

I receive a 411 error (mising content length) when using NTLM auth from Windows. Details in my StackOverflow question.

Any ideas appreciated.

@ashishtilara
Copy link

:+1

@tsharp
Copy link

tsharp commented Jun 10, 2014

Replace the $headers variable in __doRequest, in SoapClientAuth, with this:

$headers = array(
            'User-Agent: PHP-SOAP',
            'Content-Type: text/xml; charset=utf-8',
            'SOAPAction: "' . $action . '"',
            'Expect: 100-continue',
            'Connection: Keep-Alive'
        );

@dsuurlant
Copy link

I should note I'm getting the same error on Linux (Kubuntu). The above fix worked as well.

@simonebracaloni
Copy link

Same error using php 5.5 on ubutnu 14.04
The problem is in setting the Content-Length header of the request using php strlen function. Since curl automatically set this header line you can simply remove or comment out this line:
'Content-Length: ' . strlen($request),
in SoapClientAuth.php

@thybag
Copy link
Owner

thybag commented Aug 5, 2014

Hello,

I haven't got access to a copy of SharePoint with NTLM auth enabled in order to test this, but I've made the suggested fix to the develop branch ( https://github.com/thybag/PHP-SharePoint-Lists-API/tree/develop )

Would be great if anyone's able to give it a quick try & just check it all works as expected.

Thanks,
Carl

@dsuurlant
Copy link

Confirmed the develop branch fix works on Ubuntu 14.04, PHP 5.5.9.

@thybag
Copy link
Owner

thybag commented Nov 26, 2014

Cool - since this change is already in develop I'll close for now. Thanks for testing 👍

@thybag thybag closed this as completed Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants