aboutsummaryrefslogtreecommitdiffstats
path: root/main/http.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-13 08:36:35 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2008-12-13 08:36:35 +0000
commita41b34a63c52608e7e5c8e6aced613815461f4c2 (patch)
tree0559c99680217b78c0bda37a131b5f09794f43c6 /main/http.c
parentb298a3aa9b396c4055bf75104b4fb89212c44d4a (diff)
Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/http.c')
-rw-r--r--main/http.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main/http.c b/main/http.c
index 5c3aa7895..237ad6643 100644
--- a/main/http.c
+++ b/main/http.c
@@ -755,14 +755,14 @@ static void *httpd_helper_thread(void *data)
* append a random variable to your GET request. Ex: 'something.html?r=109987734'
*/
if (!contentlength) { /* opaque body ? just dump it hoping it is properly formatted */
- fprintf(ser->f, "%s", out->str);
+ fprintf(ser->f, "%s", ast_str_buffer(out));
} else {
- char *tmp = strstr(out->str, "\r\n\r\n");
+ char *tmp = strstr(ast_str_buffer(out), "\r\n\r\n");
if (tmp) {
fprintf(ser->f, "Content-length: %d\r\n", contentlength);
/* first write the header, then the body */
- if (fwrite(out->str, 1, (tmp + 4 - out->str), ser->f) != tmp + 4 - out->str) {
+ if (fwrite(ast_str_buffer(out), 1, (tmp + 4 - ast_str_buffer(out)), ser->f) != tmp + 4 - ast_str_buffer(out)) {
ast_log(LOG_WARNING, "fwrite() failed: %s\n", strerror(errno));
}
if (fwrite(tmp + 4, 1, contentlength, ser->f) != contentlength ) {