[gssdp] Handle only "200 OK" response as valid SSDP response
- From: Jussi Kukkonen <jussik src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp] Handle only "200 OK" response as valid SSDP response
- Date: Wed, 9 Jul 2014 08:30:24 +0000 (UTC)
commit 4feeb69bca18c5645b43264090cae98b1b167cb2
Author: Jussi Kukkonen <jku goto fi>
Date: Tue Jul 8 15:12:02 2014 +0300
Handle only "200 OK" response as valid SSDP response
According to the spec, the response line must be
"HTTP/1.1 200 OK".
https://bugzilla.gnome.org/show_bug.cgi?id=697084
libgssdp/gssdp-client.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/libgssdp/gssdp-client.c b/libgssdp/gssdp-client.c
index 6bfc4aa..856f36c 100644
--- a/libgssdp/gssdp-client.c
+++ b/libgssdp/gssdp-client.c
@@ -1106,12 +1106,9 @@ parse_http_response (char *buf,
*headers,
NULL,
&status_code,
- NULL)) {
- if (status_code == 200)
- *type = _GSSDP_DISCOVERY_RESPONSE;
- else
- g_warning ("Unhandled status code '%d'", status_code);
-
+ NULL) &&
+ status_code == 200) {
+ *type = _GSSDP_DISCOVERY_RESPONSE;
return TRUE;
} else {
soup_message_headers_free (*headers);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]