Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Icecast-Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
94
Issues
94
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
External Wiki
External Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
Icecast-Server
Commits
c9b6d627
Commit
c9b6d627
authored
Jan 12, 2014
by
Philipp Schafft
🦁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send 100-continue-header if client requests it
svn path=/icecast/trunk/icecast/; revision=19053
parent
c88f7d7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
configure.in
configure.in
+1
-0
src/client.c
src/client.c
+6
-0
src/client.h
src/client.h
+1
-0
src/connection.c
src/connection.c
+16
-0
No files found.
configure.in
View file @
c9b6d627
...
...
@@ -38,6 +38,7 @@ AC_CHECK_HEADERS([pwd.h unistd.h grp.h sys/types.h],,,AC_INCLUDES_DEFAULT)
AC_CHECK_FUNCS([setuid])
AC_CHECK_FUNCS([chroot])
AC_CHECK_FUNCS([chown])
AC_CHECK_FUNCS([strcasestr])
dnl Checks for typedefs, structures, and compiler characteristics.
XIPH_C__FUNC__
...
...
src/client.c
View file @
c9b6d627
...
...
@@ -202,6 +202,12 @@ static void client_send_error(client_t *client, int status, int plain, const cha
fserve_add_client
(
client
,
NULL
);
}
void
client_send_100
(
client_t
*
client
)
{
/* On demand inject a HTTP/1.1 100 Continue to make sure clients are happy */
sock_write
(
client
->
con
->
sock
,
"HTTP/1.1 100 Continue
\r\n\r\n
"
);
}
void
client_send_400
(
client_t
*
client
,
const
char
*
message
)
{
client_send_error
(
client
,
400
,
0
,
message
);
...
...
src/client.h
View file @
c9b6d627
...
...
@@ -70,6 +70,7 @@ typedef struct _client_tag
int
client_create
(
client_t
**
c_ptr
,
connection_t
*
con
,
http_parser_t
*
parser
);
void
client_destroy
(
client_t
*
client
);
void
client_send_100
(
client_t
*
client
);
void
client_send_404
(
client_t
*
client
,
const
char
*
message
);
void
client_send_401
(
client_t
*
client
);
void
client_send_403
(
client_t
*
client
,
const
char
*
message
);
...
...
src/connection.c
View file @
c9b6d627
...
...
@@ -804,6 +804,7 @@ int connection_complete_source (source_t *source, int response)
if
(
global
.
sources
<
config
->
source_limit
)
{
const
char
*
contenttype
;
const
char
*
expectcontinue
;
mount_proxy
*
mountinfo
;
format_type_t
format_type
;
...
...
@@ -846,6 +847,21 @@ int connection_complete_source (source_t *source, int response)
return
-
1
;
}
/* For PUT support we check for 100-continue and send back a 100 to stay in spec */
expectcontinue
=
httpp_getvar
(
source
->
parser
,
"expect"
);
if
(
expectcontinue
!=
NULL
)
{
#ifdef HAVE_STRCASESTR
if
(
strcasestr
(
expectcontinue
,
"100-continue"
)
!=
NULL
)
#else
WARN0
(
"OS doesn't support case insenestive substring checks..."
);
if
(
strstr
(
expectcontinue
,
"100-continue"
)
!=
NULL
)
#endif
{
client_send_100
(
source
->
client
);
}
}
global
.
sources
++
;
stats_event_args
(
NULL
,
"sources"
,
"%d"
,
global
.
sources
);
global_unlock
();
...
...
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