Mercurial > hg > orthanc
comparison Core/HttpServer/HttpOutput.cpp @ 207:7f74209ea0f8
RestApi
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Nov 2012 16:23:11 +0100 |
parents | 93e1b0e3b83a |
children | 1ac3aacd10a5 |
comparison
equal
deleted
inserted
replaced
206:4453a010d0db | 207:7f74209ea0f8 |
---|---|
74 s += "Content-Disposition: attachment; filename=\"" + std::string(contentFilename) + "\"\r\n"; | 74 s += "Content-Disposition: attachment; filename=\"" + std::string(contentFilename) + "\"\r\n"; |
75 } | 75 } |
76 | 76 |
77 s += "\r\n"; | 77 s += "\r\n"; |
78 | 78 |
79 Send(&s[0], s.size()); | |
80 } | |
81 | |
82 | |
83 void HttpOutput::SendCustomOkHeader(const std::string& customHeader) | |
84 { | |
85 std::string s = "HTTP/1.1 200 OK\r\n" + customHeader + "\r\n"; | |
79 Send(&s[0], s.size()); | 86 Send(&s[0], s.size()); |
80 } | 87 } |
81 | 88 |
82 | 89 |
83 void HttpOutput::SendMethodNotAllowedError(const std::string& allowed) | 90 void HttpOutput::SendMethodNotAllowedError(const std::string& allowed) |