Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
791f2ea9
Commit
791f2ea9
authored
Sep 01, 2015
by
Mathieu Stefani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Headers do not write their names anymore
parent
7cefb695
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
src/http.cc
src/http.cc
+2
-1
src/http_header.cc
src/http_header.cc
+3
-5
No files found.
src/http.cc
View file @
791f2ea9
...
...
@@ -372,10 +372,11 @@ Response::writeTo(Tcp::Peer& peer)
stream
<<
"HTTP/1.1 "
;
stream
<<
code_
;
stream
<<
' '
;
stream
<<
codeString
(
static_cast
<
Code
>
(
code_
)
);
stream
<<
static_cast
<
Code
>
(
code_
);
stream
<<
crlf
;
for
(
const
auto
&
header
:
headers
.
list
())
{
stream
<<
header
->
name
()
<<
": "
;
header
->
write
(
stream
);
stream
<<
crlf
;
}
...
...
src/http_header.cc
View file @
791f2ea9
...
...
@@ -243,7 +243,7 @@ ContentLength::parse(const std::string& data) {
void
ContentLength
::
write
(
std
::
ostream
&
os
)
const
{
os
<<
"Content-Length: "
<<
value_
;
os
<<
value_
;
}
void
...
...
@@ -276,7 +276,7 @@ UserAgent::parse(const std::string& data) {
void
UserAgent
::
write
(
std
::
ostream
&
os
)
const
{
os
<<
"User-Agent: "
<<
ua_
;
os
<<
ua_
;
}
void
...
...
@@ -340,7 +340,7 @@ ContentEncoding::parseRaw(const char* str, size_t len) {
void
ContentEncoding
::
write
(
std
::
ostream
&
os
)
const
{
os
<<
"Content-Encoding: "
<<
encodingString
(
encoding_
);
os
<<
encodingString
(
encoding_
);
}
Server
::
Server
(
const
std
::
vector
<
std
::
string
>&
tokens
)
...
...
@@ -365,7 +365,6 @@ Server::parse(const std::string& data)
void
Server
::
write
(
std
::
ostream
&
os
)
const
{
os
<<
"Server: "
;
std
::
copy
(
std
::
begin
(
tokens_
),
std
::
end
(
tokens_
),
std
::
ostream_iterator
<
std
::
string
>
(
os
,
" "
));
}
...
...
@@ -378,7 +377,6 @@ ContentType::parseRaw(const char* str, size_t len)
void
ContentType
::
write
(
std
::
ostream
&
os
)
const
{
os
<<
"Content-Type: "
;
os
<<
mime_
.
toString
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment