core: Ignore 'POST' request in server handler
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sat, 7 Aug 2010 01:50:53 +0000 (04:50 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Sun, 8 Aug 2010 23:18:44 +0000 (02:18 +0300)
With the current libsoup API, we are forced to handle the HTTP POST
messages before the server handler is called so by the time its called
the message must have already been handled and we don't need to do
anything about it anymore.

src/rygel/rygel-http-server.vala

index 8cc0beb..92e3853 100644 (file)
@@ -187,6 +187,11 @@ internal class Rygel.HTTPServer : Rygel.TranscodeManager, Rygel.StateMachine {
                                  string                    server_path,
                                  HashTable<string,string>? query,
                                  Soup.ClientContext        soup_client) {
+        if (msg.method == "POST") {
+            // Already handled
+            return;
+        }
+
         debug (_("HTTP %s request for URI '%s'. Headers:"),
                msg.method,
                msg.get_uri ().to_string (false));