Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
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
Main
Synchronet
Commits
b6d408a2
Commit
b6d408a2
authored
22 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Added debug for 400 error.
parent
10545404
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/websrvr.c
+4
-3
4 additions, 3 deletions
src/sbbs3/websrvr.c
with
4 additions
and
3 deletions
src/sbbs3/websrvr.c
+
4
−
3
View file @
b6d408a2
...
@@ -952,12 +952,13 @@ static BOOL check_request(http_session_t * session)
...
@@ -952,12 +952,13 @@ static BOOL check_request(http_session_t * session)
if
(
!
strcmp
(
path
,
session
->
req
.
request
))
if
(
!
strcmp
(
path
,
session
->
req
.
request
))
session
->
req
.
send_location
=
TRUE
;
session
->
req
.
send_location
=
TRUE
;
if
(
!
fexist
(
path
))
{
if
(
!
fexist
(
path
))
{
if
(
path
[
strlen
(
path
)
-
1
]
!=
'/'
)
backslash
(
path
);
strcat
(
path
,
"/"
);
strcat
(
path
,
startup
->
index_file_name
);
strcat
(
path
,
startup
->
index_file_name
);
session
->
req
.
send_location
=
TRUE
;
session
->
req
.
send_location
=
TRUE
;
}
}
if
(
strnicmp
(
session
->
req
.
request
,
root_dir
,
strlen
(
root_dir
)))
{
if
(
strnicmp
(
session
->
req
.
request
,
root_dir
,
strlen
(
root_dir
)))
{
lprintf
(
"%04d request = '%s'"
,
session
->
socket
,
session
->
req
.
request
);
lprintf
(
"%04d root_dir = '%s'"
,
session
->
socket
,
root_dir
);
send_error
(
"400 Bad Request"
,
session
);
send_error
(
"400 Bad Request"
,
session
);
session
->
req
.
keep_alive
=
FALSE
;
session
->
req
.
keep_alive
=
FALSE
;
return
(
FALSE
);
return
(
FALSE
);
...
@@ -1384,7 +1385,7 @@ void DLLCALL web_server(void* arg)
...
@@ -1384,7 +1385,7 @@ void DLLCALL web_server(void* arg)
_beginthread
(
http_session_thread
,
0
,
session
);
_beginthread
(
http_session_thread
,
0
,
session
);
}
}
#if 0 /* this is handled in cleanup()
#if 0 /* this is handled in cleanup()
*/
/* Close all open sockets */
/* Close all open sockets */
lprintf("Closing Server Socket %d", server_socket);
lprintf("Closing Server Socket %d", server_socket);
close_socket(server_socket);
close_socket(server_socket);
...
...
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