projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e83e1a4
)
Remove #fragment for HTTP request encoding YAZ-730
author
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 21 Jan 2014 10:42:25 +0000
(11:42 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Tue, 21 Jan 2014 10:42:25 +0000
(11:42 +0100)
src/http.c
patch
|
blob
|
history
diff --git
a/src/http.c
b/src/http.c
index
0f17df5
..
54521b1
100644
(file)
--- a/
src/http.c
+++ b/
src/http.c
@@
-610,11
+610,13
@@
int yaz_encode_http_response(ODR o, Z_HTTP_Response *hr)
int yaz_encode_http_request(ODR o, Z_HTTP_Request *hr)
{
Z_HTTP_Header *h;
+ char *cp;
int top0 = o->op->top;
odr_write(o, hr->method, strlen(hr->method));
odr_write(o, " ", 1);
- odr_write(o, hr->path, strlen(hr->path));
+ cp = strchr(hr->path, '#');
+ odr_write(o, hr->path, cp ? (cp - hr->path) : strlen(hr->path));
odr_write(o, " HTTP/", 6);
odr_write(o, hr->version, strlen(hr->version));
odr_write(o, "\r\n", 2);