cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl not able to handle multiple double-quotes in 401 challenge

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 11 Feb 2013 14:29:28 +0100 (CET)

On Mon, 11 Feb 2013, sumit gambhir wrote:

> Following is the scenario PUT with Digest authentication: -
> 1) Put request sent through Curl with Content-Length: 0
> 2) Server sent 401 Challenge with domain which contains
> multiple double-quotes like shown below logs.
>
> Observation-> Curl not able to handle the response and cancel the whole
> request.

The 'domain' is defined in RFC2617 as:

       domain = "domain" "=" <"> URI ( 1*SP URI ) <">

If the URL can contain a double quote, how does the parser know where to stop
parsing the value?

I take it your favorite browsers work fine with it?

> HTTP/1.1 401 Unauthorized
> Server: Sun GlassFish Communications Server 2.0

> WWW-Authenticate: Digest realm="micromethod.com
> ",domain="/xcap-ap-service/resource-lists/users/
> sip:5432100109@micromethod.com/index/~~/resource-lists/list[@name=<http://sip:5432100109@micromethod.com/index/~~/resource-lists/list%5B@name=>"Select
> Contact"]/entry[@uri="sip:5432100108_at_micromethod.com
> "]",nonce="1357298135411:12193AA21BE9C66124B03689B219FBA4",opaque="0B47F922993D2B3CAAEACFECEF0476875",stale=false,algorithm=MD5,qop="auth"

domain is supposed to be "A quoted, space-separated list of URIs"...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-11