diff options
author | Wolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de> | 2013-09-10 20:55:41 +0200 |
---|---|---|
committer | Wolfgang Draxinger <Wolfgang.Draxinger@physik.uni-muenchen.de> | 2013-09-10 20:55:41 +0200 |
commit | 71a023a46a7ab8636ff3e5aa6ae42b181a6ac69d (patch) | |
tree | b2398a30522ddd22e520ff78a4a00e3f4af34d8f | |
parent | 7f58ba9f11f131f165bd29575f93a50d9dc26c06 (diff) | |
download | litheweb-71a023a46a7ab8636ff3e5aa6ae42b181a6ac69d.tar.gz litheweb-71a023a46a7ab8636ff3e5aa6ae42b181a6ac69d.tar.bz2 |
added support for Content-Disposition response header
-rw-r--r-- | picohttp.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -1053,6 +1053,18 @@ int picohttpResponseSendHeaders ( return e; } + if(req->response.disposition) { + /* Content-Type header */ + if( 0 > (e = picohttpIO_WRITE_STATIC_STR(PICOHTTP_STR_CONTENT)) || + 0 > (e = picohttpIO_WRITE_STATIC_STR(PICOHTTP_STR__DISPOSITION)) || + 0 > (e = picohttpIO_WRITE_STATIC_STR(PICOHTTP_STR_CLSP)) || + 0 > (e = picohttpIoWrite( + req->ioops, strlen(req->response.disposition), + req->response.disposition)) || + 0 > (e = picohttpIO_WRITE_STATIC_STR(PICOHTTP_STR_CRLF)) ) + return e; + } + /* Content-Length header */ if( req->response.contentlength ){ p = picohttp_fmt_uint(tmp, req->response.contentlength); |