![]() |
|
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
MIVA® RESOURCES: Changing MvCALL HTTP headersWhen accessing external URLs, you can send faked HTTP headers inclusive cookies, user agent, referrers, 'accept' strings, or whatever else with plain Miva. Well, you will not find it in the documentation, but it is a very easy and useful trick. An example that follows, sends a cookie to a server requesting it. It may be useful if the server accepts requests from cookie-enabled browsers only. In the same way, through MvCALL, you could suggest the server that you are accessing it with any agent (browser):
Explanation: Miva sends the string you put in the ACTION field without any modifications - it just appends 'HTTP/1.0' and two CR/LF after it. If you put your own HTTP header (inclusive cookie or whatever else) and append something that the next 'HTTP/1.0' (appended automatically by Miva) does not disturb some of more touchy servers, it works perfectly. I used 'Accept: ' in the example, but you can try anything else (you might put no terminating string as well) - it should work too. HTTP header exampleFew examples of usual HTTP directives that you can attach to the MvCALL ACTION string:
You could also suggest that Miva is able to use HTTP/1.1, but I cannot guarantee what happens if the server really sends some HTTP/1.0 incompatible response.
Some Useful LinksList of RFC'sRFC-1945: Hypertext Transfer Protocol - HTTP/1.0 RFC-2068: Hypertext Transfer Protocol - HTTP/1.1 (obsolate) RFC-2616: Hypertext Transfer Protocol - HTTP/1.1 RFC Editor Search the RFC Database |
||||||||||
|
Miva and some other terms used on this page are registerd trademarks of the Miva Corporation |