re: curl -v -X PUSH -H "Host:www.example.com" http://localhost/some_page

Does it work that way?
I remember having to send a complete http response including headers.
>From the v2 docs (http://trafficserver.apache.org/docs/v2/admin/http.htm):

Understanding HTTP PUSH

PUSH uses the HTTP 1.1 message format. The body of a PUSH request
contains the response header and response body that you want to place
in the cache. The following is an example of a PUSH request:

PUSH http://www.company.com HTTP/1.0
Content-length: 84
HTTP/1.0 200 OK
Content-type: text/html
Content-length: 17
<HTML>
a
</HTML>
IMPORTANT: Your header must include Content-length; Content-length
must include both header and body byte count.


2013/1/27 Geert Lugtenberg <[email protected]>:
> There should be a configurable in records.config named
> proxy.config.http.push_method_enabled which you need to change from 0 to 1.
> Then I believe that the default in records.config is that the localhost can
> send requests to TS with alternative methods such as PURGE or PUSH. So if
> you don't need to PUSH content using another ip, on the same server running
> TS, try this:
>
> (pushing http://www.example.com/some_page in the cache)
>
> curl -v -X PUSH -H "Host:www.example.com" http://localhost/some_page
>
> 200 OK response if the page was succesfully pushed into cache.
>
> ________________________________
> Van: Rashid Zamani [[email protected]]
> Verzonden: zondag 27 januari 2013 9:20
> Aan: [email protected]
> Onderwerp: push content
>
> I am trying to use push cache option of Apache Traffic Server(ATS), to push
> some content into my cache. I read the documentation, and tried to follow it
> but I have following questions/problems using this option:
>
> 1 - In the documentation it mentiones in order to enable PUSH request,
> modify proxy.config.http.quick_filter.mask in records.config. Yet I could
> not find such a super mask to modify in that file. Running grep -r
> proxy.config.http.quick_filter.mask . in ATS configuration folder shows me
> that this super mask exists in ip_allow.config file. Are they the same?
> Should I modify it there or should I add it to records.config? Unfortunately
> I cannot check this due to my issue No.2.
>
> 2 - I am not sure how to send this HTTP PUSH request and to whom (on which
> port - the same port ATS is running on?). There is perl-script which suppose
> to automate the process, although I was not able to run the script yet(don't
> know any perl but working on it - getting Can't locate
> File/MimeInfo/Magic.pm in @INC). I wanted to print out the port from the
> script to see how to push into the cache.
>
> Any hints/tips would be appreciated.
>
> --
> Rashid Zamani

Reply via email to