[yawn] Fix Pickle method sets Content-type: text/plain instead of text/html

vcrhonek vcrhonek at fedoraproject.org
Tue Mar 13 11:17:34 UTC 2012


commit dc9823a770deda2e57467e42fec8a37b028e3313
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date:   Tue Mar 13 12:17:18 2012 +0100

    Fix Pickle method sets Content-type: text/plain instead of text/html

 yawn-0-content-type.patch |   11 +++++++++++
 yawn.spec                 |   11 ++++++++++-
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/yawn-0-content-type.patch b/yawn-0-content-type.patch
new file mode 100644
index 0000000..f94884d
--- /dev/null
+++ b/yawn-0-content-type.patch
@@ -0,0 +1,11 @@
+diff -up ./yawn.py.orig ./yawn.py
+--- ./yawn.py.orig	2012-03-13 12:08:50.699204574 +0100
++++ ./yawn.py	2012-03-13 12:09:00.978254992 +0100
+@@ -673,6 +673,7 @@ def _printInstRow(req, urlargs, keys, in
+ ##############################################################################
+ def Pickle(req, obj):
+     req.add_common_vars()
++    req.content_type = "Text/HTML"
+     ht = _printHead("Object", "Object Serialization", req)
+     ht+= '<p><i>To pass the following object as a Parameter Reference to a method call, copy this string to your clipboard and paste it to the parameter field.</i><p>'
+     ht+= '<hr>'+obj+'<hr>'
diff --git a/yawn.spec b/yawn.spec
index 1147f30..2252642 100644
--- a/yawn.spec
+++ b/yawn.spec
@@ -5,7 +5,7 @@
 
 Name:           yawn
 Version:        0
-Release:        0.2.20120227svn%{svnrev}%{?dist}
+Release:        0.3.20120227svn%{svnrev}%{?dist}
 Summary:        Yet Another WBEM Navigator
 
 
@@ -17,6 +17,9 @@ URL:            https://sourceforge.net/apps/mediawiki/pywbem/index.php?title=YA
 #  wget http://pywbem.svn.sourceforge.net/viewvc/pywbem/yawn/trunk/yawn.py
 Source0:        yawn.py
 
+# Patch0: resolves bz#802683, reported upstream (see link in bz)
+Patch0:         yawn-0-content-type.patch
+
 BuildRequires:  httpd
 Requires:       mod_python, pywbem, httpd
 BuildArch:      noarch
@@ -25,6 +28,7 @@ BuildArch:      noarch
 Web-based CIM/WBEM browser
 
 %prep
+%patch0 -p1 -b .content-type
 
 %build
 
@@ -63,6 +67,11 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %{apacheconfdir}/conf.d/yawn.conf
 
 %changelog
+* Tue Mar 13 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 0-0.3.20120227svn561
+- Fix Pickle method sets Content-type: text/plain instead of text/html
+  (patch by Jan Safranek, jsafrane at redhat.com)
+  Resolves: #802683
+
 * Tue Feb 28 2012 Vitezslav Crhonek <vcrhonek at redhat.com> - 0-0.2.20120227svn561
 - Fix twice listed files
 


More information about the scm-commits mailing list