[SRU] webob last stable version 1.1.1 response header bug

Bug #920197 reported by peter.pang on 2012-01-22
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
python-webob (Ubuntu)
High
Chuck Short
Precise
High
Chuck Short
Quantal
High
Chuck Short
swift (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned
Quantal
Undecided
Unassigned

Bug Description

if u use webob last stable version 1.1.1 with swift and want to send a HEAD request to get an object info,

the response http header CONTENT-TYPE and CONTENT-LENGTH will be wrong,

it should return the real content type and real length of the object like: image/gif , 139520 (bytes)

but it just return text/html and all http header length

the real stable version i test is 1.0.8

thanks

Martin Vidner (mvidner) wrote :

The bug shows up in functional tests, this particular case triggers it:

    nosetests test.functional.tests:TestFile.testHead

We have traced it down to this change in WebOb made on Jun 30 2011, shortly after 1.0.8 was released:
https://github.com/Pylons/webob/commit/2e23e221ff85eac81623ff7a07b1a630ae263ec9
"make sure WSGIHTTPException return the same headers for HEAD and GET requests"

It appears that a contributing factor is that Swift uses exceptions even for successful results, such as webob.exc.HTTPOk. The erroneous content-type and content-length correspond to the textual representation of the HTTPOk "exception".

Martin Vidner (mvidner) wrote :

I have filed a bug for WebOb: https://github.com/Pylons/webob/issues/44
and a pull request there with a fix: https://github.com/Pylons/webob/pull/45

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in swift (Ubuntu):
status: New → Confirmed
Roman Yepishev (rye) on 2012-05-16
Changed in python-webob (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Roman Yepishev (rye) wrote :

The patch from commit 1c04de58efce1a9da6b0c5d8aa9e260d3f9d6d20 for python-webob

The attachment "01_lp_920197.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch

Raising tasks for precise and quantal for python-webob.

This should be SRU'ed.

Changed in python-webob (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → High
status: Confirmed → Triaged
Changed in python-webob (Ubuntu Quantal):
status: Confirmed → Triaged
James Page (james-page) on 2012-05-24
Changed in python-webob (Ubuntu Quantal):
assignee: nobody → Chuck Short (zulcss)
Changed in python-webob (Ubuntu Precise):
assignee: nobody → Chuck Short (zulcss)
Scott Moser (smoser) on 2012-05-24
Changed in swift (Ubuntu Precise):
status: New → Confirmed
Chuck Short (zulcss) on 2012-05-24
summary: - webob last stable version 1.1.1 response header bug
+ [SRU] webob last stable version 1.1.1 response header bug
Chuck Short (zulcss) wrote :

Impact:

python-webob was shipped with a regression that was introduced in 1.1.1. This is triggered by swift, the full details of the bug can be found at: https://github.com/Pylons/webob/issues/44

Development Fix:

This patch has been fixed in quantal with the last upload.

Test Case:

Run the following test:

 nosetests test.functional.tests:TestFile.testHead

Regression Potential:

There is no regression potential.

James Page (james-page) on 2012-05-31
Changed in python-webob (Ubuntu Precise):
milestone: none → ubuntu-12.04.1
Changed in swift (Ubuntu Precise):
milestone: none → ubuntu-12.04.1
Pete Zaitcev (zaitcev) on 2012-06-08
Changed in swift:
status: New → Confirmed
tags: added: rls-q-incoming
James Page (james-page) wrote :

python-webob (1.1.1-1ubuntu1) quantal; urgency=low

  * Fix regression introduced by upstream, currently
    WSGIHyttpException overwrites headers of an
    empty-bodied HEAD response. Backported from
    (https://github.com/Pylons/webob/commit/1c04de58efce1a9da6b0c5d8aa9e260d3f9d6d20)
    - debian/patches/01_lp_920197.patch
    - debian/rules, debian/control: Use quilt.

 -- Chuck Short <email address hidden> Thu, 24 May 2012 10:08:42 -0400

Changed in python-webob (Ubuntu Quantal):
status: Triaged → Fix Released
Changed in swift (Ubuntu Quantal):
status: Confirmed → Fix Released
Changed in swift (Ubuntu Precise):
status: Confirmed → Triaged
James Page (james-page) on 2012-07-19
Changed in swift (Ubuntu Precise):
milestone: ubuntu-12.04.1 → none
Changed in python-webob (Ubuntu Precise):
status: Triaged → In Progress

Hello peter.pang, or anyone else affected,

Accepted into precise-proposed. The package will build now and be available in a few hours in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-webob (Ubuntu Precise):
status: In Progress → Fix Committed
Changed in swift (Ubuntu Precise):
status: Triaged → Fix Committed
tags: added: verification-needed
Changed in swift (Ubuntu Precise):
status: Fix Committed → Triaged
Scott Kitterman (kitterman) wrote :

Put swift back to Triaged since I only accepted python-webob.

Roman Yepishev (rye) wrote :

python-webob:
  Installed: 1.1.1-1

HEAD http://.../v1.0/9830818c942e40bbabaad02454524597/public/index.html
200 OK
Date: Fri, 10 Aug 2012 07:36:16 GMT
Accept-Ranges: bytes
ETag: 5b72f5fe49849d509cbb4be3b733e002
Content-Length: 13
Content-Type: text/plain
Last-Modified: Fri, 18 May 2012 14:25:36 GMT
X-Object-Meta-Mtime: 1337351132.4

====

python-webob:
  Installed: 1.1.1-1ubuntu0
HEAD http://.../v1.0/9830818c942e40bbabaad02454524597/public/index.html
200 OK
Date: Fri, 10 Aug 2012 07:38:19 GMT
Accept-Ranges: bytes
ETag: 5b72f5fe49849d509cbb4be3b733e002
Content-Length: 2671
Content-Type: text/html
Last-Modified: Fri, 18 May 2012 14:25:36 GMT
X-Object-Meta-Mtime: 1337351132.4

Verified for 12.04

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-webob - 1.1.1-1ubuntu0

---------------
python-webob (1.1.1-1ubuntu0) precise-proposed; urgency=low

  * Fix regression introduced by upstream, currently
    WSGIHyttpException overwrites headers of an
    empty-bodied HEAD response. (LP: #920197) Backported from
    (https://github.com/Pylons/webob/commit/1c04de58efce1a9da6b0c5d8aa9e260d3f9d6d20)
 -- Chuck Short <email address hidden> Tue, 24 Jul 2012 13:33:43 -0500

Changed in python-webob (Ubuntu Precise):
status: Fix Committed → Fix Released
John Dickinson (notmyname) wrote :

Removed swift as an affected project. Swift no longer uses webob.

Changed in swift:
status: Confirmed → Invalid
no longer affects: swift
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers