Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
d86f9611
Commit
d86f9611
authored
23 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
support HUGE requests too
parent
6a62fc4a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/server/sws.c
+17
-8
17 additions, 8 deletions
tests/server/sws.c
with
17 additions
and
8 deletions
tests/server/sws.c
+
17
−
8
View file @
d86f9611
...
...
@@ -135,13 +135,18 @@ void storerequest(char *reqbuf)
}
#define REQBUFSIZ 4096
#define MAXDOCNAMELEN 1024
#define REQBUFSIZ 50000
#define REQBUFSIZ_TXT "49999"
/* very-big-path support */
#define MAXDOCNAMELEN 40000
#define MAXDOCNAMELEN_TXT "39999"
#define REQUEST_KEYWORD_SIZE 256
static
int
get_request
(
int
sock
,
int
*
part
)
{
char
reqbuf
[
REQBUFSIZ
],
doc
[
MAXDOCNAMELEN
];
char
request
[
REQUEST_KEYWORD_SIZE
];
static
char
reqbuf
[
REQBUFSIZ
],
doc
[
MAXDOCNAMELEN
];
static
char
request
[
REQUEST_KEYWORD_SIZE
];
unsigned
int
offset
=
0
;
int
prot_major
,
prot_minor
;
char
logbuf
[
256
];
...
...
@@ -177,7 +182,7 @@ static int get_request(int sock, int *part)
/* dump the request to an external file */
storerequest
(
reqbuf
);
if
(
sscanf
(
reqbuf
,
"%
s %
s HTTP/%d.%d"
,
if
(
sscanf
(
reqbuf
,
"%
"
REQBUFSIZ_TXT
"s %"
MAXDOCNAMELEN_TXT
"
s HTTP/%d.%d"
,
request
,
doc
,
&
prot_major
,
...
...
@@ -191,10 +196,14 @@ static int get_request(int sock, int *part)
/* get the number after it */
if
(
ptr
)
{
sprintf
(
logbuf
,
"Got request: %s %s HTTP/%d.%d"
,
request
,
doc
,
prot_major
,
prot_minor
);
if
((
strlen
(
doc
)
+
strlen
(
request
))
<
200
)
sprintf
(
logbuf
,
"Got request: %s %s HTTP/%d.%d"
,
request
,
doc
,
prot_major
,
prot_minor
);
else
sprintf
(
logbuf
,
"Got a *HUGE* request HTTP/%d.%d"
,
prot_major
,
prot_minor
);
logmsg
(
logbuf
);
if
(
!
strncmp
(
"/verifiedserver"
,
ptr
,
15
))
{
logmsg
(
"Are-we-friendly question received"
);
return
-
2
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment