[ 
https://issues.apache.org/jira/browse/TS-4388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15262280#comment-15262280
 ] 

ASF subversion and git services commented on TS-4388:
-----------------------------------------------------

Commit 600f4bc4d0754f7e028836f597a4a34f180be0c4 in trafficserver's branch 
refs/heads/master from [[email protected]]
[ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=600f4bc ]

TS-4388: Add an API test for TSHttpTxnParentProxySet.

Add an API test for TSHttpTxnParentProxySet. This test sends a
request to the API test synserver, and expects a response. The quirk
is that it can't get the right response unless TSHttpTxnParentProxySet()
is called to parent proxy to the syn server.

This test currently crashes, so it is only enabled at REGRESSION_TEST_FATAL
(level 4).

This closes #605.


> parent proxy crashes with TSHttpTxnParentProxySet
> -------------------------------------------------
>
>                 Key: TS-4388
>                 URL: https://issues.apache.org/jira/browse/TS-4388
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Plugins
>            Reporter: James Peach
>            Assignee: John Rushford
>             Fix For: 7.0.0
>
>
> If you call {{TSHttpTxnParentProxySet}} to explicitly set a parent proxy 
> target, the proxy request will fail because it is not initialized correctly.
> {code}
> [Switching to Thread 0x7ffff5023700 (LWP 24309)]
> 0x000000000061da0a in HttpTransact::build_request (s=0x7fffe2f43278, 
> base_request=0x7fffe2f43990,
>     outgoing_request=0x7fffe2f43a10, outgoing_version=...) at 
> HttpTransact.cc:7852
> 7852      } else if (s->current.request_to == PARENT_PROXY && 
> !s->parent_result.rec->parent_is_proxy &&
> (gdb) p s->current.request_to
> $1 = HttpTransact::PARENT_PROXY
> (gdb) p s->parent_result
> $2 = {r = PARENT_SPECIFIED, hostname = 0x7ffff7e29c19 "127.0.0.1", port = 
> 10090, retry = false, line_number = -1, epoch = 0x0,
>   rec = 0xeeeeffff, last_parent = 0, start_parent = 0, wrap_around = false, 
> last_lookup = 0}
> (gdb)
> {code}
> The corresponding {{HttpTransact.cc}} code is:
> {code}
>     } else if (s->current.request_to == PARENT_PROXY && 
> !s->parent_result.rec->parent_is_proxy &&
>                outgoing_request->is_target_in_url()) {
>       // If the parent is an origin server remove the hostname from the url.
>       DebugTxn("http_trans", "[build_request] removing target from URL for a 
> parent origin.");
>       HttpTransactHeaders::remove_host_name_from_url(outgoing_request);
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to