Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
Icecast-Server
Commits
f8250d8d
Commit
f8250d8d
authored
Aug 16, 2002
by
Michael Smith
Browse files
Minor fixes for logging response codes correctly (hopefully)
svn path=/trunk/icecast/; revision=3840
parent
25f0c9f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/client.c
View file @
f8250d8d
...
...
@@ -52,6 +52,7 @@ void client_send_404(client_t *client, char *message) {
"Content-Type: text/html
\r\n\r\n
"
"<b>%s</b>
\r\n
"
,
message
);
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
=
bytes
;
client
->
respcode
=
404
;
client_destroy
(
client
);
}
...
...
@@ -62,5 +63,6 @@ void client_send_401(client_t *client) {
"
\r\n
"
"You need to authenticate
\r\n
"
);
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
=
bytes
;
client
->
respcode
=
401
;
client_destroy
(
client
);
}
src/connection.c
View file @
f8250d8d
...
...
@@ -319,6 +319,7 @@ int connection_create_source(client_t *client, connection_t *con, http_parser_t
WARN0
(
"No content-type header, cannot handle source"
);
goto
fail
;
}
client
->
respcode
=
200
;
bytes
=
sock_write
(
client
->
con
->
sock
,
"HTTP/1.0 200 OK
\r\n\r\n
"
);
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
=
bytes
;
...
...
@@ -506,6 +507,7 @@ static void _handle_get_request(connection_t *con,
/* If the file exists, then transform it, otherwise, write a 404 */
if
(
stat
(
fullpath
,
&
statbuf
)
==
0
)
{
DEBUG0
(
"Stats request, sending XSL transformed stats"
);
client
->
respcode
=
200
;
bytes
=
sock_write
(
client
->
con
->
sock
,
"HTTP/1.0 200 OK
\r\n
Content-Type: text/html
\r\n\r\n
"
);
if
(
bytes
>
0
)
client
->
con
->
sent_bytes
=
bytes
;
...
...
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