replace srv:/// with http://pykit/ for jquery POST support
Stefan Bund [Fri, 10 Dec 2010 16:25:07 +0000 (17:25 +0100)]
Publisher.cc
pykit.ini

index 23eb5bf..aa96b67 100644 (file)
@@ -98,7 +98,6 @@ InternalServerReply(QNetworkAccessManager::Operation operation,
 prefix_ void pykit::detail::InternalServerReply::bufferPostData()
 {
     QVariant cl (request().header(QNetworkRequest::ContentLengthHeader));
-    std::cerr << "postdata contentlength: " << (cl.isValid() ? cl.toString().toStdString() : "invalid") << "\n";
     connect(postDevice_, SIGNAL(readyRead()), this, SLOT(postDataReadable()));
     connect(postDevice_, SIGNAL(readChannelFinished()), this, SLOT(postDataComplete()));
     postData_.open(WriteOnly);
@@ -298,9 +297,8 @@ pykit::InternalNetworkAccessManager::createRequest(Operation operation,
                                                         QNetworkRequest const & request,
                                                         QIODevice * device)
 {
-    if (request.url().scheme() != "srv")
+    if (request.url().host() != "pykit")
         return QNetworkAccessManager::createRequest(operation, request, device);
-
     return new detail::InternalServerReply(operation, request, device, publisher_);
 }
 
index d490f6f..ef666df 100644 (file)
--- a/pykit.ini
+++ b/pykit.ini
@@ -5,4 +5,4 @@ organization=g0dil.de
 
 [Viewer]
 init=init.py
-home=srv:///
+home=http://pykit/