The branch master has been updated
       via  2e3b82926a8cdae5a1bfbf3ac47a6012c270391b (commit)
      from  c37ebbd6f97d23b291c49c4ae2b94c27d732de30 (commit)


- Log -----------------------------------------------------------------
commit 2e3b82926a8cdae5a1bfbf3ac47a6012c270391b
Author: Tianjia Zhang <tianjia.zh...@linux.alibaba.com>
Date:   Wed Dec 8 15:53:49 2021 +0800

    apps/s_server: Correct s_server to return the correct file path
    
    When s_server responds to a file data with the -WWW parameter, it
    always gets a path named "GET". In this case, we need to skip the
    "GET /" character to get the correct file path.
    
    Signed-off-by: Tianjia Zhang <tianjia.zh...@linux.alibaba.com>
    
    Reviewed-by: Paul Yang <kaishen...@antfin.com>
    Reviewed-by: Tomas Mraz <to...@openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17231)

-----------------------------------------------------------------------

Summary of changes:
 apps/s_server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/apps/s_server.c b/apps/s_server.c
index 6b0e013ca7..e0a52287ee 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -3220,7 +3220,7 @@ static int www_body(int s, int stype, int prot, unsigned 
char *context)
             }
             BIO_puts(io, "</pre></BODY></HTML>\r\n\r\n");
             break;
-        } else if ((www == 2 || www == 3) && HAS_PREFIX(p, "GET /")) {
+        } else if ((www == 2 || www == 3) && CHECK_AND_SKIP_PREFIX(p, "GET 
/")) {
             BIO *file;
             char *e;
             static const char *text =

Reply via email to