Ignore:
Timestamp:
Jan 16, 2021, 5:20:59 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
0197418
Parents:
35ea4f3
Message:

httpforall now only loads file if explicit path is given.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/worker.cfa

    r35ea4f3 rb57db73  
    9797                        }
    9898
     99                        if( !options.file_cache.path ) {
     100                                if( options.log ) {
     101                                        sout | "=== File Not Found (" | nonl;
     102                                        write(sout, file, name_size);
     103                                        sout | ") ===";
     104                                }
     105                                answer_error(fd, E405);
     106                                continue REQUEST;
     107                        }
     108
    99109                        // Get the fd from the file cache
    100110                        int ans_fd;
     
    104114                        // If we can't find the file, return 404
    105115                        if( ans_fd < 0 ) {
    106                                 sout | "=== File Not Found (" | nonl;
    107                                 write(sout, file, name_size);
    108                                 sout | ") ===";
     116                                if( options.log ) {
     117                                        sout | "=== File Not Found (" | nonl;
     118                                        write(sout, file, name_size);
     119                                        sout | ") ===";
     120                                }
    109121                                answer_error(fd, E404);
    110122                                continue REQUEST;
Note: See TracChangeset for help on using the changeset viewer.