[ https://issues.apache.org/jira/browse/TS-3447?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14365491#comment-14365491 ]
ASF GitHub Bot commented on TS-3447: ------------------------------------ Github user bryancall commented on a diff in the pull request: https://github.com/apache/trafficserver/pull/181#discussion_r26591169 --- Diff: plugins/experimental/buffer_upload/buffer_upload.cc --- @@ -753,6 +753,15 @@ attach_pvc_plugin(TSCont /* contp ATS_UNUSED */, TSEvent event, void *edata) memcpy(replacement_host_str, host_hdr_str_val, host_hdr_str_val_len); --- End diff -- Might as well clean up the memset. You can set replacement_host_str[host_hdr_str_val_len + 1] = '\0' after the memcpy instead of doing a memset. > Failing to remap POST requests if buffer_upload plugin is enabled and Host > header contains port number > ------------------------------------------------------------------------------------------------------ > > Key: TS-3447 > URL: https://issues.apache.org/jira/browse/TS-3447 > Project: Traffic Server > Issue Type: Bug > Components: Plugins > Reporter: Ethan Lai > Fix For: 6.0.0 > > > We've experienced POST request mapping issues in some situation while > buffer_upload plugin is enabled. > After cross reference, we found that Host header with port value cannot be > mapped correctly. > Sample remap.config: > {quote} > map http://www.example.com/ http://127.0.0.1:8001/ > map http://www.example.com:8080/ http://127.0.0.1:8001/ > {quote} > Sample plugin.config > {quote} > buffer_upload.so conf/trafficserver/buffer_upload/buffer_upload.config > {quote} > Sample buffer_upload.config > {quote} > use_disk_buffer 1 > convert_url 0 > chunk_size 1024 > url_list_file conf/trafficserver/buffer_upload/url_list.config > base_dir var/buffer_upload_tmp > subdir_num 100 > thread_num 10 > mem_buffer_size 51000 > {quote} > Sample buffer upload url_list.config > {quote} > http://www.example.com/upload/upload.php > {quote} > Sample cmds & responses > {quote} > curl http://www.example.com/test.php -X POST -d 'blah' > > map ok > curl http://www.example.com:8080/test.php > > map ok > curl http://www.example.com:8080/test.php -X POST -d 'blah' > > 404 Not Found! (Not Found on Accelerator) > {quote} > I've tried to correct this and will update with pull request shortly, thanks -- This message was sent by Atlassian JIRA (v6.3.4#6332)