You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by "Wendy Huang (JIRA)" <ji...@apache.org> on 2009/12/22 23:42:29 UTC

[jira] Created: (TS-98) trafficserver should follow redirects when a special header is provided

trafficserver should follow redirects when a special header is provided 
------------------------------------------------------------------------

                 Key: TS-98
                 URL: https://issues.apache.org/jira/browse/TS-98
             Project: Traffic Server
          Issue Type: New Feature
          Components: Core
            Reporter: Wendy Huang
         Attachments: code_diff.txt

Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
response that the new OS responds with. 
it is prefered to be a response header instead of a response error code, since changing the meaning of an
existing http response error code is undesirable.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828919#action_12828919 ] 

Leif Hedstrom commented on TS-98:
---------------------------------

Another option, if the above changes are too extreme, would be to extend the API to include a "length" header. This way, you don't have to make an assumption about the string being NULL terminated, and you also don't have to call strlen() on it twice (like now). You'd still have to store the "length" somewhere, like you store the URL string.

I'm OK with either solution, my main "beef" here is to assume that the strings are NULL terminated.

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Bryan Call
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom reassigned TS-98:
-------------------------------

    Assignee: Leif Hedstrom

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Leif Hedstrom
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Call updated TS-98:
-------------------------

    Attachment: redirect_bcall_001.patch

Updated the patch file to remove the prototype of INKHttpTxnCreateRequest from the header file and the comment of it ever existing in the InkAPI.cc.

APIs that have been deprecated, but still exist should be in the header file.  If we are going to remove the API then there is no reason for it to be in the header.

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Bryan Call
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, new_TS-98.patch, redirect_bcall_001.patch, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803438#action_12803438 ] 

Bryan Call commented on TS-98:
------------------------------

I reviewed the patch and here are some comments:

1. do a strlen(url) + 1 once and assign that to a const size_t for the operations on the size
2. use 2 space indentation instead of 4 space

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>         Attachments: code_diff.txt
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828923#action_12828923 ] 

Leif Hedstrom commented on TS-98:
---------------------------------

Dammit, forgot. In either case, I think we should have a "getter" function too. If not like above, one that returns the string, and takes an  (int*) to store the length in. This way, a second plugin can for example see if this has been set by a previous plugin, and not overwrite the redirect URL.

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Bryan Call
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Call resolved TS-98.
--------------------------

    Resolution: Fixed

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Bryan Call
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, new_TS-98.patch, redirect_bcall_001.patch, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12828759#action_12828759 ] 

Leif Hedstrom commented on TS-98:
---------------------------------

Talking to Wendy, I'm wondering if this new API should be slightly different. First of all, I'm not keen on sending in the string, and assuming it's NULL terminated. Almost all APIs in TS don't make such assumption. But to be even more "consistent", I think the APIs should be something in line with

   inkapi INKMLoc            INKRedirectUrlGet(INKHttpTxn txnp);
   inkapi INKReturnCode      INKRedirectUrlSet(INKHttpTxn txnp, INKMLoc url);


(or some such, not saying this is the way it should be, but something in line with how the other API functions deal with URLs). Then in the code, you dont' have to use strlen() to get URL lengths, or make assumptions that the "string" is NULL terminated.

Thoughts?

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Bryan Call
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Wendy Huang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wendy Huang updated TS-98:
--------------------------

    Attachment: TS-98.patch

code diff custom redirecion support.

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>         Attachments: code_diff.txt, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Wendy Huang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12793823#action_12793823 ] 

Wendy Huang commented on TS-98:
-------------------------------

This is copied from Bugzilla# 3037414

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>         Attachments: code_diff.txt
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Bryan Call (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Call reassigned TS-98:
----------------------------

    Assignee: Bryan Call  (was: Leif Hedstrom)

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Bryan Call
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Wendy Huang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wendy Huang updated TS-98:
--------------------------

    Attachment: new_TS-98.patch

new patch file attached (new_TS-98.patch), this includes the change for adding string length argument and getter function.

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>            Assignee: Bryan Call
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, new_TS-98.patch, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-98:
----------------------------

    Fix Version/s: 2.0.0a

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>             Fix For: 2.0.0a
>
>         Attachments: code_diff.txt, TS-98.patch
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-98) trafficserver should follow redirects when a special header is provided

Posted by "Wendy Huang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wendy Huang updated TS-98:
--------------------------

    Attachment: code_diff.txt

code diff attached.

> trafficserver should follow redirects when a special header is provided 
> ------------------------------------------------------------------------
>
>                 Key: TS-98
>                 URL: https://issues.apache.org/jira/browse/TS-98
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Core
>            Reporter: Wendy Huang
>         Attachments: code_diff.txt
>
>
> Some people need a service such that if the Origin Server (OS) returns back a particular HTTP
> response code or HTTP response header, TS simply redirects the request to another Origin Server and serves the
> response that the new OS responds with. 
> it is prefered to be a response header instead of a response error code, since changing the meaning of an
> existing http response error code is undesirable.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.