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

Head requests fail with 200 response #7472

Closed
cyberduck opened this issue Oct 2, 2013 · 4 comments
Closed

Head requests fail with 200 response #7472

cyberduck opened this issue Oct 2, 2013 · 4 comments
Assignees
Labels
bug fixed openstack OpenStack Swift Protocol Implementation
Milestone

Comments

@cyberduck
Copy link
Collaborator

0116e36 created the issue

We use nginx as reverse proxy for swift-proxy and in some cases enable caching. Nginx do GET queries instead of HEAD, because of improvements, when caching enabled. And reply to HEAD-reqs actually the same headers, as on GETs, but without actual response's body. This is normal behavior, as described here http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4

But cyberduck, i think, expect "204 No content" response and do not apply reply from server.

Clients should apply 200 response on HEAD requests as described in RFC.

Problem appears on stable, beta and nightly builds.

HTTP-log:

POST /v2.0/tokens HTTP/1.1
Accept: application/json
Content-Type: application/json
Content-Length: 145
Host: auth.dev
Connection: Keep-Alive
User-Agent: Cyberduck/4.4 (Mac OS X/10.8.5) (x86_64)

HTTP/1.1 200 OK
Server: nginx/1.1.19
Date: Wed, 02 Oct 2013 19:30:09 GMT
Content-Type: application/json
Transfer-Encoding: chunked
Connection: keep-alive
Vary: X-Auth-Token
Content-Encoding: gzip



HEAD /v1/DEV_35611469d1f24cc596f6c949872513a3 HTTP/1.1
X-Auth-Token: 03c0a8b7e8144584b6f1c2b1c77ab150
Host: swift.dev:8080
Connection: Keep-Alive
User-Agent: Cyberduck/4.4 (Mac OS X/10.8.5) (x86_64)

HTTP/1.1 200 OK
Date: Wed, 02 Oct 2013 19:30:11 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 8
Connection: close
Accept-Ranges: bytes
X-Timestamp: 1380717991.93372
X-Account-Bytes-Used: 1721818
X-Account-Container-Count: 2
X-Account-Object-Count: 1
@cyberduck
Copy link
Collaborator Author

@dkocher commented

We should accept any 2xx response code as per Get Account Metadata.

@cyberduck
Copy link
Collaborator Author

@dkocher commented

Fixed in (iterate-ch/java-openstack-swift@08a9723).

@cyberduck
Copy link
Collaborator Author

@dkocher commented

In 3729e55.

@cyberduck
Copy link
Collaborator Author

cyberduck commented Oct 3, 2013

0116e36 commented

Replying to [comment:4 dkocher]:

Fixed in (iterate-ch/java-openstack-swift@08a9723).

Looks like now it accepts 200 and 204 responses, but not 2xx, as in comment #11955

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed openstack OpenStack Swift Protocol Implementation
Projects
None yet
Development

No branches or pull requests

2 participants