ext/neon/gstneonhttpsrc.*: Don't discard GET parameters from URL if existing.
Original commit message from CVS: Patch by: Wouter Cloetens <wouter@mind.be> * ext/neon/gstneonhttpsrc.c: (gst_neonhttp_src_dispose), (gst_neonhttp_src_set_location), (gst_neonhttp_src_send_request_and_redirect): * ext/neon/gstneonhttpsrc.h: Don't discard GET parameters from URL if existing. Fixes #481200.
This commit is contained in:
parent
77e7c4aadd
commit
de5d4c6313
11
ChangeLog
11
ChangeLog
@ -1,3 +1,14 @@
|
|||||||
|
2007-09-28 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
Patch by: Wouter Cloetens <wouter@mind.be>
|
||||||
|
|
||||||
|
* ext/neon/gstneonhttpsrc.c: (gst_neonhttp_src_dispose),
|
||||||
|
(gst_neonhttp_src_set_location),
|
||||||
|
(gst_neonhttp_src_send_request_and_redirect):
|
||||||
|
* ext/neon/gstneonhttpsrc.h:
|
||||||
|
Don't discard GET parameters from URL if existing.
|
||||||
|
Fixes #481200.
|
||||||
|
|
||||||
2007-09-27 Thijs Vermeir <thijsvermeir@gmail.com>
|
2007-09-27 Thijs Vermeir <thijsvermeir@gmail.com>
|
||||||
|
|
||||||
* gst/librfb/gstrfbsrc.c:
|
* gst/librfb/gstrfbsrc.c:
|
||||||
|
@ -287,6 +287,9 @@ gst_neonhttp_src_dispose (GObject * gobject)
|
|||||||
if (src->location) {
|
if (src->location) {
|
||||||
ne_free (src->location);
|
ne_free (src->location);
|
||||||
}
|
}
|
||||||
|
if (src->query_string) {
|
||||||
|
ne_free (src->query_string);
|
||||||
|
}
|
||||||
|
|
||||||
G_OBJECT_CLASS (parent_class)->dispose (gobject);
|
G_OBJECT_CLASS (parent_class)->dispose (gobject);
|
||||||
}
|
}
|
||||||
@ -706,6 +709,10 @@ gst_neonhttp_src_set_location (GstNeonhttpSrc * src, const gchar * uri)
|
|||||||
ne_free (src->location);
|
ne_free (src->location);
|
||||||
src->location = NULL;
|
src->location = NULL;
|
||||||
}
|
}
|
||||||
|
if (src->query_string) {
|
||||||
|
ne_free (src->query_string);
|
||||||
|
src->query_string = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (ne_uri_parse (uri, &src->uri) != 0)
|
if (ne_uri_parse (uri, &src->uri) != 0)
|
||||||
goto parse_error;
|
goto parse_error;
|
||||||
@ -726,6 +733,11 @@ gst_neonhttp_src_set_location (GstNeonhttpSrc * src, const gchar * uri)
|
|||||||
if (!src->uri.path)
|
if (!src->uri.path)
|
||||||
src->uri.path = g_strdup ("");
|
src->uri.path = g_strdup ("");
|
||||||
|
|
||||||
|
if (src->uri.query)
|
||||||
|
src->query_string = g_strjoin ("?", src->uri.path, src->uri.query, NULL);
|
||||||
|
else
|
||||||
|
src->query_string = g_strdup (src->uri.path);
|
||||||
|
|
||||||
src->location = ne_uri_unparse (&src->uri);
|
src->location = ne_uri_unparse (&src->uri);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -737,6 +749,10 @@ parse_error:
|
|||||||
ne_free (src->location);
|
ne_free (src->location);
|
||||||
src->location = NULL;
|
src->location = NULL;
|
||||||
}
|
}
|
||||||
|
if (src->query_string) {
|
||||||
|
ne_free (src->query_string);
|
||||||
|
src->query_string = NULL;
|
||||||
|
}
|
||||||
ne_uri_free (&src->uri);
|
ne_uri_free (&src->uri);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@ -804,7 +820,7 @@ gst_neonhttp_src_send_request_and_redirect (GstNeonhttpSrc * src,
|
|||||||
ne_set_session_flag (session, NE_SESSFLAG_ICYPROTO, 1);
|
ne_set_session_flag (session, NE_SESSFLAG_ICYPROTO, 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
request = ne_request_create (session, "GET", src->uri.path);
|
request = ne_request_create (session, "GET", src->query_string);
|
||||||
|
|
||||||
if (src->user_agent) {
|
if (src->user_agent) {
|
||||||
ne_add_request_header (request, "User-Agent", src->user_agent);
|
ne_add_request_header (request, "User-Agent", src->user_agent);
|
||||||
|
@ -49,6 +49,7 @@ struct _GstNeonhttpSrc {
|
|||||||
ne_request *request;
|
ne_request *request;
|
||||||
ne_uri uri;
|
ne_uri uri;
|
||||||
gchar *location;
|
gchar *location;
|
||||||
|
gchar *query_string;
|
||||||
ne_uri proxy;
|
ne_uri proxy;
|
||||||
gchar *user_agent;
|
gchar *user_agent;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user