Skip to content

Commit

Permalink
fix HTTP status when file id is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
yuqing committed Apr 14, 2017
1 parent d2b9958 commit 5e5f356
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion HISTORY
@@ -1,7 +1,8 @@

Version 1.19 2017-03-14
Version 1.19 2017-04-14
* change INT64_PRINTF_FORMAT to PRId64
* ignore range->end >= file_size
* fix HTTP status when file id is invalid

Version 1.18 2016-02-24
* bug fixed: do NOT use header_only field of request,
Expand Down
4 changes: 4 additions & 0 deletions src/common.c
Expand Up @@ -781,6 +781,10 @@ int fdfs_http_request_handler(struct fdfs_http_context *pContext)
{
http_status = HTTP_NOTFOUND;
}
else if (result == EINVAL)
{
http_status = HTTP_BADREQUEST;
}
else
{
http_status = HTTP_INTERNAL_SERVER_ERROR;
Expand Down

0 comments on commit 5e5f356

Please sign in to comment.