couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Goodlad (JIRA)" <>
Subject [jira] Created: (COUCHDB-678) Virtualhost drops querystring parameters
Date Mon, 01 Mar 2010 12:12:08 GMT
Virtualhost drops querystring parameters

                 Key: COUCHDB-678
             Project: CouchDB
          Issue Type: Bug
          Components: HTTP Interface
    Affects Versions: 0.11
         Environment: OSX Snow Leopard 10.6.2, CouchDB 0.11.0b15d10793-git
            Reporter: David Goodlad
            Priority: Minor

When making GET requests with querystring parameters (http://foo/bar?querystring), the query
string seems to get dropped in the request is to a host with a matching vhost entry.

I have the following vhost setup in local.ini:
swift-ca2.swiftshift.local:5984 = /swift-ca

I've tested my view without vhosts by requesting http://localhost:5984/swift-ca/_design/swift/_view/schedules?include_docs=true
and it works fine (docs are included in the json, as expected). The following is the debug
log when that request is made:

[debug] [<0.213.0>] 'GET' /swift-ca/_design/swift/_view/schedules?include_docs=true
Headers: [{'Connection',"close"},
          {'User-Agent',"HTTP%20Client/0.9.1 CFNetwork/454.5 Darwin/10.2.0 (i386) (MacBookPro5%2C1)"}]
[debug] [<0.213.0>] OAuth Params: [{"include_docs","true"}]
[debug] [<0.213.0>] request_group {Pid, Seq} {<0.221.0>,214}
[info] [<0.213.0>] - - 'GET' /swift-ca/_design/swift/_view/schedules?include_docs=true
[debug] [<0.213.0>] Include Doc: <<"ac2a8cdf84a6ad8257bb366c2800410b">>
[debug] [<0.213.0>] Include Doc: <<"ac2a8cdf84a6ad8257bb366c28004747">>
[debug] [<0.213.0>] Include Doc: <<"ac2a8cdf84a6ad8257bb366c280052e3">>
[debug] [<0.213.0>] Include Doc: <<"ac2a8cdf84a6ad8257bb366c28005fac">>
[debug] [<0.213.0>] Include Doc: <<"ac2a8cdf84a6ad8257bb366c2800608c">>

If I, instead, request via the vhost at http://swift-ca2.swiftshift.local:5984/_design/swift/_view/schedules?include_docs=true,
the docs are _not_ included in the resulting json, and the debug log shows the following:

[debug] [<0.94.0>] Vhost Target: '"/swift-ca/_design/swift/_view/schedules"'
[debug] [<0.94.0>] 'GET' /swift-ca/_design/swift/_view/schedules {1,1}
Headers: [{'Connection',"close"},
          {'User-Agent',"HTTP%20Client/0.9.1 CFNetwork/454.5 Darwin/10.2.0 (i386) (MacBookPro5%2C1)"}]
[debug] [<0.94.0>] OAuth Params: []
[debug] [<0.91.0>] Spawning new group server for view group _design/swift in database
[debug] [<0.94.0>] request_group {Pid, Seq} {<0.221.0>,214}
[info] [<0.94.0>] - - 'GET' /swift-ca/_design/swift/_view/schedules 200
[debug] [<0.81.0>] New task status for swift-ca _design/swift: Finishing.

Note that in the second line the querystring is omitted.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message