[httpclient] Earn duke dollars easily ;-)

Hello everybody,
How can I accept every cookie using the httpclient API ?
Here is the warning message I get when I download an Altavista source code :
19 juil. 2004 10:39:53 org.apache.commons.httpclient.HttpMethodBase processResponseHeaders
ATTENTION: Cookie rejected: "B=600d0a50fn273&b=2". Illegal domain attribute ".yahoo.com". Domain of origin: "fr.altavista.com"
Thank you for advance
Mathias

It is not a valid cookie - it is trying to suggest it is from a domain that
it isn't really from.
What are you trying to do ? Are you writing the cookie or receiving it ?
Does your standard browser accept it ?I'm trying to retreive an Altavista result page.
Altavista has recently been bought by Yahoo Corp.
That's why when you do a request on altavista.com, you're redirected to yahoo.com (who puts a cookie) and again to altavista.com (which is also defining a cookie)
No problem for a standard browser, but the "redirection+cookie" milkshake seems to be fatal for appache httpclient API.
Have you read the info on Jakarta's site?
http://jakarta.apache.org/commons/httpclient/cookies.html
Note: HTTPClient does't currently support version 2 cookies, this might be your problemYes, of course, but there's nothing about accepting any cookie without validation, and that's what I want to do.
Mathias

Similar Messages

  • Pocketing DUKE DOLLARS!!!

    How to get earned Duke Dollar??????

    some heartening info: earning dukes has nothing to do with peripatetic evenings in the red light district...

  • Where's my monthly duke dollars?

    according to the faq "Duke dollars: JDC members acquire Duke Dollars upon registration, then again on a monthly basis. "
    I dont know enough to earn dukes (yet)... so i count on getting this... otherwise i will have to continue being cheap! I dont like being miserly with my dukes : (
    PS While i have your attention, Christmas is coming - so can i make a request for "lots" of dukes?? ; )

    they are hiding under the Chrismas Tree.

  • How do you add Duke Dollars to a post???

    How do you get the little Duke Dollars thingy to show up next to your post? There are no buttons to do so on the page where I'm ttyping this, nor on the preview page. Nor does it say anything about it in the Duke Dollars FAQ.

    Oh never mind! I saw the option to add Dukes appear after the message was posted.
    IMHO you should be able to add Dukes either on the form or the preview page.

  • Using WAIT to repeatedly check a file !!Duke dollars!!

    I have created this method, it is supposed to read a text file when a button is pressed after i have allocated an amount of time to check the text file. the text file must be checked every 2mins or so to see if there have been any changes!
    i have some code here but 'wait(10000)' doesnt seem to have any effect!
    can anybody help
    theres 15 duke dollars in it for the best solution
    cheers everyone
    private void polling()
    try {
    wait(10000);
    } catch (Exception e){
    try {
    Stack male = new Stack();
              Stack female = new Stack();
              File esbian = new File("02May2002_Test_Facts.txt");
              FileReader ond = new FileReader(esbian);
              BufferedReader hecker = new BufferedReader(ond);
    int ef;
    String incident = "INCIDENT" ;
              while (true)
                   String lum = new String();
                   String umber = "";
                   String olyfeck = hecker.readLine();
                   if (olyfeck == null)
                        break;
                   StringTokenizer tarman = new StringTokenizer(olyfeck);
                   while (tarman.hasMoreTokens())
    umber = tarman.nextToken();
                        for( ef=0; ef < 1; ef++)
    umber = umber.replace('\u0028' , '\u0020');
    umber = umber.replace('\u0029' , '\u0020');
                        umber = umber.trim().toUpperCase();
    if (umber.equals("INCIDENT" ) || umber.equals("EVENT") ||umber.equals("ALARM") || umber.equals("FAULTRECORD") || umber.equals("INTERPRETEDFAULTRECORD"))
    lum = umber;
                             agentout.append("subscription succeeded: " + umber + "\r\n");
              hecker.close();
    catch(IOException efe)
         System.err.println("ERROR: " + efe) ;
    } // end of method polling

    I have created this method, it is supposed to read a text file when a button is pressed after i have allocated an amount of time to check the text file. the text file must be checked every 2mins or so to see if there have been any changes!
    i have some code here but 'wait(10000)' doesnt seem to have any effect!
    can anybody help
    theres 15 duke dollars in it for the best solution
    cheers everyone
    private void polling()
    try {
    wait(10000);
    } catch (Exception e){
    try {
    Stack male = new Stack();
              Stack female = new Stack();
              File esbian = new File("02May2002_Test_Facts.txt");
              FileReader ond = new FileReader(esbian);
              BufferedReader hecker = new BufferedReader(ond);
    int ef;
    String incident = "INCIDENT" ;
              while (true)
                   String lum = new String();
                   String umber = "";
                   String olyfeck = hecker.readLine();
                   if (olyfeck == null)
                        break;
                   StringTokenizer tarman = new StringTokenizer(olyfeck);
                   while (tarman.hasMoreTokens())
    umber = tarman.nextToken();
                        for( ef=0; ef < 1; ef++)
    umber = umber.replace('\u0028' , '\u0020');
    umber = umber.replace('\u0029' , '\u0020');
                        umber = umber.trim().toUpperCase();
    if (umber.equals("INCIDENT" ) || umber.equals("EVENT") ||umber.equals("ALARM") || umber.equals("FAULTRECORD") || umber.equals("INTERPRETEDFAULTRECORD"))
    lum = umber;
                             agentout.append("subscription succeeded: " + umber + "\r\n");
              hecker.close();
    catch(IOException efe)
         System.err.println("ERROR: " + efe) ;
    } // end of method polling

  • Assigning duke dollars

    How do I award Duke dollars to the best respondent to my question?

    After you post a question, there will be a hyperlink like "assign duke dollar" in the page of your post. Follow it to assign the duke dollar to your question. To reward the duke dollar to the response, you have to log in first, open your post, then you can see a icon in front of every repsponse, you can click the one you want to reward.

  • I wanna assign you ALL my Duke Dollars....

    ...for a new question i have BUT b4 I can do that I need to retrive back the duke dollars from my earlier messages that haven't been answered and have my dollars gathering dust...how on earth do i do that?

    Silkm I have no issues with assigning you all my dukes from all those earlier questions...just go there, type anything and I will assign them to you if u can solve my query...
    It's gotta do with setting the classpath...and yes, i have already been thru google and forums here...
    This is what i do:
    - Start>Control Panel>System>Advanced>Environment Variables
    - Click on Path in the System Variables section
    - Click Edit and add C:\Program Files\Java\j2re1.4.1_01\bin AFTER %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\Program Files\Common Files\Adaptec Shared\System;
    - Next I go to DOS and get my C prompt to C:\Program Files\Java\j2re1.4.1_01\bin
    - I type javac helloworld.java and ENTER
    - I get "javac is not recognised as an internal or external command, operable program or batch file"
    So then I go back to Start>Control Panel>System>Advanced>Environment Variables
    - This time I click on New in the "User Variables for Gaurav" section(that's me) - after all i am logged in as Gaurav on my XP machine!
    - I type Path in Variable Name and C:\Program Files\Java\j2re1.4.1_01\bin in Variable Value
    - Save
    - goto DOS
    - type helloworld.java and get "javac is not recognised as an internal or external command, operable program or batch file"
    BTW i have installed j2re-1_4_1_01-windows-i586 on a XP machine
    HELP!

  • How do you award duke dollars

    How do you award duke dollars

    At the top of your post, ther will be an option to "Assign" duke dollars. Once you assign them to your post, you will see an option to "Award" duke dollars in the header of the replies to the post.
    Why don't you assign a few to this post to witness that! :-)
    Kamran

  • Next/previous links?  Duke dollars...

    I am offering Duke Dollars for help in creating next/previous links here:
    http://forum.java.sun.com/thread.jsp?forum=45&thread=183010
    I was told that I should ask here as there may be more help here...

    Actually I think that respondant was suggesting that you search the JDBC forum - they had already posted some information in here.

  • HI what are duke dollars?

    Hi everyone, just joined the JDC - I am a complete newbie here, what are DUKE DOLLARS? Can you educate me on some things you guys do on the forums? Thanks! :)
    cp_l0g1ck

    That's in the FAQ which you can see here: http://forum.java.sun.com/faq.jsp

  • Duke Dollars, What are they and why are they in this forum?

    Hi,
    Can somebody please tell me what duke dollars are and why they are in this forum? some topics have duke dollars, but don't know what that means.
    Thanks in advance
    Arjen

    hahahahha... the moment i posted this topic, i received the link to assigning dollars to a topic as well as a link to what duke dollars are. :) lol

  • Cant assign duke dollars --not working why ?

    cannot see the assign duke dollar button why ?

    I'd tell you if there were some Dukes on offer.

  • Duke Dollars Not Working

    I tried to assign Duke Dollars to my last post. It says that I have 50 dollars to assign. Whne I try to assign them I get a 500 Server error. i kept trying and it eventually displayed a stack trace stating the user has insufficient dollars. What Gives?

    I'd tell you if there were some Dukes on offer.

  • Who has the most duke dollars?

    Is there a place in the JDC where you find find a list of who had the most duke dollars? I think they had this a long time ago, but I'm not sure what happend to it.
    Thanks,
    Strider

    http://developer.java.sun.com/developer/community/dd.jshtml#winners
    (Do I get any duke dollars for this?)

  • Test topic for duke dollars test case

    Have had issues reported regarding not being able to assign duke dollars. This is a test to see if there's an issue or not. -- DanG

    it should look like:
    Forum Home > New To Java Technology
    Topic: test to assign Duke dollars
           Duke Dollars
           If you'd like, assign Duke Dollars to this topic to encourange
           others to answer your question. [More Info]  at the top of this thread.

Maybe you are looking for