cURL / Mailing Lists / curl-library / Single Mail

curl-library

IIS says: Bad Request (Invalid Verb)

From: Alan Pinstein <apinstein_at_mac.com>
Date: Mon, 15 Mar 2004 00:32:21 -0500

I am building an app that uses libcurl to talk to a .NET web service.
While this worked perfectly for a while (against IIS 5.0 / ASP.NET 1.0)
using NTLM or AnyAuth, we recently started testing against IIS 6.0 +
ASP.NET 1.1 and the NTLM/AnyAuth no longer works...

Any SOAP requests made with NTLM authentication fail after
negotiation... tcpflow results:

====================
POST /mediabinwebservice/MediaBinServer.asmx HTTP/1.1
Authorization: NTLM
TlRMTVNTUAADAAAAGAAYAFIAAAAAAAAAagAAAAoACgBAAAAACAAIAEoAAAAAAAAAUgAAAAAA
AABqAAAAAYIAAGludGVyd292ZW5hcGluc3RlaX+ZCEoC9v1dbH389UQKbnz3djzdKu9PVA==
User-Agent: curl/7.11.1-pre1 (powerpc-apple-darwin7.2.0)
libcurl/7.11.1-pre1 OpenSSL/0.9.7c ipv6 zlib/1.1.4
Host: obsfucated.com
Pragma: no-cache
Accept: */*
Content-Type:text/xml; charset=utf-8
SOAPAction:"http://www.mediabin.com/GetMediaBinServerName"
Content-Length: 303

<?xml version="1.0" encoding="utf-8"?><soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:
Body><GetMediaBinServerName xmlns="http://www.mediabin.com"
/></soap:Body></soap:Envelope>
065.161.004.200.00080-010.000.001.109.58947: HTTP/1.1 400 Bad Request
Content-Type: text/html
Date: Mon, 15 Mar 2004 04:26:54 GMT
Connection: close
Content-Length: 35

<h1>Bad Request (Invalid Verb)</h1>
====================

I have tried this with a variety of libcurl versions, always with the
same problem. To isolate the problem from my app code, I replicated the
results with command-line curl... the EXACT request works perfectly
with --basic, and simply switching it to --ntlm causes the above error.

Analysis of the raw HTTP communication shows that the only difference
b/w the 2 requests is the "Authorization:" as expected, save of course
the preceeding NTLM handshake.

I basically realize that this isn't a libcurl issue, but am hoping that
someone else out there might be using libcurl for .net web services and
have an idea for me.

Thanks,
Alan Pinstein
Received on 2004-03-15