bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #38043] Incorrect nil return value from NSURLConnection +sendSynchr


From: Wolfgang Lux
Subject: [bug #38043] Incorrect nil return value from NSURLConnection +sendSynchronousRequest:returningResponse:error:
Date: Tue, 08 Jan 2013 09:34:52 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-US) AppleWebKit/533.21.1+(KHTML, like Gecko, Safari/533.19.4) Version/5.11.1 OmniWeb/622.18.0

URL:
  <http://savannah.gnu.org/bugs/?38043>

                 Summary: Incorrect nil return value from NSURLConnection
+sendSynchronousRequest:returningResponse:error:
                 Project: GNUstep
            Submitted by: wlux
            Submitted on: Di 08 Jan 2013 09:34:52 GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

According to Apple's documentation this method "Returns nil if a connection
could not be created or if the download fails." The GNUstep implementation,
however, also returns nil from this method when the body of the web server
response is empty. It should return an empty NSData object instead.
Test case is attached. The attached, simple web server responds 204 No Content
to every GET request. When compiled with GNUstep the test program prints
127.0.0.1 - - [2013-01-08 10:31:38 +0100] "GET / HTTP/1.1" - "HTTP/1.1 204 No
Content"
2013-01-08 10:31:38.719 test[89837] data = (null)
When compiled with Cocoa, the test program prints:
127.0.0.1 - - [2013-01-08 10:32:55 +0100] "GET / HTTP/1.1" "test-Cocoa
(unknown version) CFNetwork/454.12.4 Darwin/10.8.0 (i386) (iMac5%2C1)"
"HTTP/1.1 204 No Content"
2013-01-08 10:32:55.592 test-Cocoa[89858:903] data = <>




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Di 08 Jan 2013 09:34:52 GMT  Name: WebServer.m  Size: 1kB   By: wlux

<http://savannah.gnu.org/bugs/download.php?file_id=27220>
-------------------------------------------------------
Date: Di 08 Jan 2013 09:34:52 GMT  Name: test.m  Size: 412B   By: wlux

<http://savannah.gnu.org/bugs/download.php?file_id=27221>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?38043>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]