| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
Hi, I'm trying to request a http web site with QHttp. The problem is that I can't access directly to the page, I just know this url: http://www.mywebsite.com and the page is redirected to another page that I don't know and that can change: http://www.mywebsite.com/todays-article-10001.html. So I receive a 301 http error code, and that's all, but how may I find the destination page with the QHttpResponseHeader or anything else? Thanks for your help, Regards, SC -- [ signature omitted ]
On Fri, May 2, 2008 at 2:52 PM, StÃphane <stemmanu@xxxxxxx> wrote:
> So I receive a 301 http error code, and that's all, but how may I find the
> destination page with the QHttpResponseHeader or anything else?
you need the field "location" in the response header -- i.e.
response->value("location")
- Dominik
N§²æìr¸zÇu©[hªØµêÞÚÞçÚè[^r(éì®&Þ{azËç-¢»ayºÈ¬µªÜ+Þjwbú+«b¢xm¶ÿ+-²Úè[^r(ú{^ë-
Dominik Riebeling wrote:
> On Fri, May 2, 2008 at 2:52 PM, StÃphane <stemmanu@xxxxxxx> wrote:
>
>> So I receive a 301 http error code, and that's all, but how may I find the
>> destination page with the QHttpResponseHeader or anything else?
>>
>
> you need the field "location" in the response header -- i.e.
> response->value("location")
>
>
> - Dominik
> NïïïïïrïïzÇuïïï[hïØïïÞïÞçïï[^r(ïïïïìï&Þ{azËïï-ïïayïÈïïïÜ+ïjwbïï+ïïbïxmïïïï+-ïïï[^r(ïï{^ïï-/===
Of course, you are right...I should work on the RFC 1945. Indeed my
problem is resolved.
Thanks a lot,
Stephane
--
[ signature omitted ]
StÃphane wrote:
>Dominik Riebeling wrote:
>> On Fri, May 2, 2008 at 2:52 PM, StÃphane <stemmanu@xxxxxxx> wrote:
>>> So I receive a 301 http error code, and that's all, but how may I
>>> find the destination page with the QHttpResponseHeader or anything
>>> else?
>>
>> you need the field "location" in the response header -- i.e.
>> response->value("location")
>>
>>
>> - Dominik
>> NïïïïïrïïzÇuïïï[hïØïïÞïÞçïï[^r(ïïïïìï&Þ{azËïï-ïïayïÈïïïÜ+ïjwbïï+ïï
>>bïxmïïïï+-ïïï[^r(ïï{^ïï-/===
>
>Of course, you are right...I should work on the RFC 1945. Indeed my
>problem is resolved.
No. Prefer RFC 2616.
By the way, the Network Access API will tell you if there was a
redirection, all parsed and ready to use.
--
[ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.
Errr... You could try to read the HTTP protocol documentation. It will surely tell you what header is used to give you the new URL. Google will help you find the RFC. Just google for the RFC and you're in business. André "Stéphane" <stemmanu@xxxxxxx> schreef in bericht news:481B0E84.5050804@xxxxxxxxxx > Hi, > > I'm trying to request a http web site with QHttp. The problem is that I > can't access directly to the page, I just know this url: > http://www.mywebsite.com and the page is redirected to another page that I > don't know and that can change: > http://www.mywebsite.com/todays-article-10001.html. > > So I receive a 301 http error code, and that's all, but how may I find the > destination page with the QHttpResponseHeader or anything else? > > Thanks for your help, > Regards, > SC > > -- > To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with > "unsubscribe" in the subject or the body. > List archive and information: http://lists.trolltech.com/qt-interest/ -- [ signature omitted ]