From 2fedb4a4b67f7856bbfc5d1508524ef9c3d85942 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Wed, 29 Dec 2010 07:24:32 +0000 Subject: Remove type=feed and type=entry parameters from application/atom+xml media types as they make IE 6's XMLHttpRequest hang. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1053559 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/atom/atom.hpp | 9 +++++++++ sca-cpp/trunk/modules/http/http.hpp | 4 ++-- sca-cpp/trunk/modules/server/mod-eval.hpp | 4 ++-- sca-cpp/trunk/modules/wsgi/atomutil.py | 6 ++++++ sca-cpp/trunk/modules/wsgi/composite.py | 4 ++-- sca-cpp/trunk/modules/wsgi/httputil.py | 4 ++-- 6 files changed, 23 insertions(+), 8 deletions(-) (limited to 'sca-cpp/trunk') diff --git a/sca-cpp/trunk/modules/atom/atom.hpp b/sca-cpp/trunk/modules/atom/atom.hpp index 253be9bdd6..ff172170f7 100644 --- a/sca-cpp/trunk/modules/atom/atom.hpp +++ b/sca-cpp/trunk/modules/atom/atom.hpp @@ -65,6 +65,15 @@ const bool isATOMFeed(const list& ls) { return contains(car(ls), "& ls) { + if (!isXML(ls)) + return false; + return contains(car(ls), " get(const string& url, const CURLSession& cs) { const list ls(reverse(cadr(content(res)))); debug(ls, "http::get::content"); - if (contains(ct, "application/atom+xml;type=entry")) { + if (atom::isATOMEntry(ls)) { // Read an ATOM entry const value val(atom::entryValue(content(atom::readATOMEntry(ls)))); debug(val, "http::get::result"); return val; } - if (contains(ct, "application/atom+xml;type=feed") || atom::isATOMFeed(ls)) { + if (contains(ct, "application/atom+xml") || atom::isATOMFeed(ls)) { // Read an ATOM feed const value val(atom::feedValues(content(atom::readATOMFeed(ls)))); debug(val, "http::get::result"); diff --git a/sca-cpp/trunk/modules/server/mod-eval.hpp b/sca-cpp/trunk/modules/server/mod-eval.hpp index b8d3147459..8dac21de04 100644 --- a/sca-cpp/trunk/modules/server/mod-eval.hpp +++ b/sca-cpp/trunk/modules/server/mod-eval.hpp @@ -137,9 +137,9 @@ const failable get(request_rec* r, const lambda&)>& // Write ATOM feed or entry if (isString(car(c)) && isString(cadr(c))) { if (isNil(cddr(path))) - return httpd::writeResult(atom::writeATOMFeed(atom::feedValuesToElements(c)), "application/atom+xml;type=feed", r); + return httpd::writeResult(atom::writeATOMFeed(atom::feedValuesToElements(c)), "application/atom+xml", r); else - return httpd::writeResult(atom::writeATOMEntry(atom::entryValuesToElements(c)), "application/atom+xml;type=entry", r); + return httpd::writeResult(atom::writeATOMEntry(atom::entryValuesToElements(c)), "application/atom+xml", r); } // Write JSON value diff --git a/sca-cpp/trunk/modules/wsgi/atomutil.py b/sca-cpp/trunk/modules/wsgi/atomutil.py index 106e69c3c6..8e812abbe9 100644 --- a/sca-cpp/trunk/modules/wsgi/atomutil.py +++ b/sca-cpp/trunk/modules/wsgi/atomutil.py @@ -54,6 +54,12 @@ def isATOMFeed(l): return False return contains(car(l), "> stderr, "Client result", v return v - if contains(ct, "application/atom+xml;type=feed"): + if contains(ct, "application/atom+xml") or atomutil.isATOMFeed(ls): # Read an ATOM feed v = atomutil.feedValues(atomutil.readATOMFeed(ls)) print >> stderr, "Client result", v -- cgit v1.2.3