From: Stefan Bund Date: Fri, 10 Dec 2010 16:25:07 +0000 (+0100) Subject: replace srv:/// with http://pykit/ for jquery POST support X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=37d3472d9de0b152d362d9dba1d7453b0976a626;p=pykit.git replace srv:/// with pykit/ for jquery POST support --- diff --git a/Publisher.cc b/Publisher.cc index 23eb5bf..aa96b67 100644 --- a/Publisher.cc +++ b/Publisher.cc @@ -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_); } diff --git a/pykit.ini b/pykit.ini index d490f6f..ef666df 100644 --- a/pykit.ini +++ b/pykit.ini @@ -5,4 +5,4 @@ organization=g0dil.de [Viewer] init=init.py -home=srv:/// +home=http://pykit/