[SRU] webob last stable version 1.1.1 response header bug

Bug #920197 reported by peter.pang
50
This bug affects 8 people
Affects Status Importance Assigned to Milestone
python-webob (Ubuntu)
Fix Released
High
Chuck Short
Precise
Fix Released
High
Chuck Short
Quantal
Fix Released
High
Chuck Short
swift (Ubuntu)
Fix Released
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Quantal
Fix Released
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

Revision history for this message
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".

Revision history for this message
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

Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in swift (Ubuntu):
status: New → Confirmed
Roman Yepishev (rye)
Changed in python-webob (Ubuntu):
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Roman Yepishev (rye) wrote :

The patch from commit 1c04de58efce1a9da6b0c5d8aa9e260d3f9d6d20 for python-webob

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
James Page (james-page) wrote : Re: webob last stable version 1.1.1 response header bug

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)
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)
Changed in swift (Ubuntu Precise):
status: New → Confirmed
Chuck Short (zulcss)
summary: - webob last stable version 1.1.1 response header bug
+ [SRU] webob last stable version 1.1.1 response header bug
Revision history for this message
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)
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)
Changed in swift:
status: New → Confirmed
tags: added: rls-q-incoming
Revision history for this message
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)
Changed in swift (Ubuntu Precise):
milestone: ubuntu-12.04.1 → none
Changed in python-webob (Ubuntu Precise):
status: Triaged → In Progress
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

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
Revision history for this message
Scott Kitterman (kitterman) wrote :

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

Revision history for this message
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
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

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.

Revision history for this message
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
Revision history for this message
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
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in swift (Ubuntu Precise):
status: Triaged → Won't Fix
Revision history for this message
ROCHE (guyroche08-6) wrote : Re :[Bug 920197] Re: [SRU] webob last stable version 1.1.1 response header bug

sorry to have bothered you during those years ... so long ago. I'm now on Ubuntu 21.10 and everything seems to be working fine.  The problem reported in early 2021 with .. Ubuntu software .. seems to have been corrected.  thank you again for all you do to achieve a wonderful operating system ..... best regards ...

Envoyé depuis la toute nouvelle application AOL pour Android

  Le jeu., oct. 14, 2021 à 8:33, Steve Langasek<email address hidden> a écrit: The Precise Pangolin has reached end of life, so this bug will not be
fixed for that release

** Changed in: swift (Ubuntu Precise)
      Status: Triaged => Won't Fix

--
You received this bug notification because you are subscribed to Ubuntu
ubuntu-12.04.1.
Matching subscriptions: No Audio after update kernel 3 2 025 in Ubuntu 12 04  32bits. Good in kernel 3 2 024 !  Alsa 1 025 not compiled in kernel 3 2 025.  It's the same problem with ubuntu 12 10 alpha I tried today too !(but kernel 3 4 ...).  A+
https://bugs.launchpad.net/bugs/920197

Title:
  [SRU] webob last stable version 1.1.1 response header bug

Status in python-webob package in Ubuntu:
  Fix Released
Status in swift package in Ubuntu:
  Fix Released
Status in python-webob source package in Precise:
  Fix Released
Status in swift source package in Precise:
  Won't Fix
Status in python-webob source package in Quantal:
  Fix Released
Status in swift source package in Quantal:
  Fix Released

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-webob/+bug/920197/+subscriptions

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.