Hey all -

Just FYI, I solved this problem! It was because ruby net/http was not
setting the http headers for Connection and Keep-Alive. I set them manually
and now it all works!

Thanks for your help!
Jin

On Mon, Feb 9, 2009 at 11:00 AM, Jin Lee <[email protected]> wrote:

> Hey all -
>
> I found out a little bit more of what is going on. Now I have it throwing a
> 500 instead of a 302 redirect. I noticed that before my jsessionid kept
> changing on every get or post. I changed my code to get the cookie and to
> re-send it back up when I do the post request. CAS is now showing this error
> message:
>
> ContinuationNotFoundException: No flow execution continuation could be
> found in this gro
> up with id
> '25ADEC35-4F94-B401-DBC2-89EDB3854DEA;username=<user>;password=<pass>;_eventId=submit;submit=LOGIN'
> -- perhaps the continuation has expired or
>  has been invalidated?
>
> org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor
> kServlet.java:583)
>
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
> .java:511)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> org.jasig.cas.web.init.SafeDispatcherServlet.service(SafeDispatcherServl
> et.java:115)
>
> org.inspektr.common.web.ClientInfoThreadLocalFilter.doFilterInternal(Cli
> entInfoThreadLocalFilter.java:48)
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequ
> estFilter.java:76)
> </pre></p><p><b>root cause</b>
> <pre>org.springframework.webflow.execution.reposi
> tory.FlowExecutionRestorationFailureException: A problem occurred restoring
> the
> flow execution with key
> '_c0ADB1C2B-6755-0B3C-F881-F0394694DDFE_k25ADEC35-4F94-B
> 401-DBC2-89EDB3854DEA;username=<user>;password=<pass>;_eventId=submit;sub
> mit=LOGIN';
>
> Any suggestions/insight is greatly appreciated - thanks all -
>
> Jin
>
> On Fri, Feb 6, 2009 at 10:40 AM, Jin Lee <[email protected]> wrote:
>>
>>> Hi Sean -
>>>
>>> Thanks for your reply. It didn't seem to work. However, I have dug deeper
>>> and found some clues.
>>>
>>> It returns an empty string, but the http status is 302 redirect. Any idea
>>> why this could be happening?
>>>
>>> Thank you,
>>> Jin
>>>
>>>
>>> On Thu, Feb 5, 2009 at 3:41 PM, Sean R. McNamara <
>>> [email protected]> wrote:
>>>
>>>> Hi Jin,
>>>>
>>>> You may want to try to set
>>>>
>>>> _eventId=submit
>>>>
>>>> in your post.
>>>>
>>>> Not definitely sure this will help, but, it's worth a try.
>>>>
>>>> ..Sean.
>>>>
>>>> Jin Lee wrote:
>>>>
>>>>> Hi there all -
>>>>>
>>>>> Was wondering if you can give me a hand with a strange issue I am
>>>>> experiencing. I am trying to login through CAS using a ruby script in 
>>>>> order
>>>>> to screen scrape some data on a protected webpage.
>>>>>
>>>>> What I did was issue a get request on login, take the lt=<ticket_id>,
>>>>> and post to login with lt, username, and password.
>>>>>
>>>>> Here is the code:
>>>>>
>>>>> uri = URI.parse(cas_login_url)
>>>>> http = Net::HTTP.new(uri.host, uri.port)
>>>>> http.verify_mode = OpenSSL::SSL::VERIFY_NONE
>>>>> http.use_ssl = true
>>>>> req = Net::HTTP::Post.new(uri.path)
>>>>> req.set_form_data({'lt'=>ticket, 'username'=>username,
>>>>> 'password'=>password})
>>>>> res = http.request(req)
>>>>>
>>>>> I've logged most of the activity going on here and I am posting to the
>>>>> correct URL, good on the ticket ID, username, and password. The response I
>>>>> get back is simply an empty string. I'm not sure why this is happening, 
>>>>> when
>>>>> I issue a get request I can see the html coming in easily.
>>>>>
>>>>> Possible reasons:
>>>>> Do I need to set any http header like user agent, referer, etc (I think
>>>>> these are done for me automatically since a get request runs fine?)
>>>>> Something to do with SSL?
>>>>> Something to do with CAS rejecting ruby?
>>>>>
>>>>> Any help is greatly appreciated -
>>>>>
>>>>> Jin
>>>>> --
>>>>> You are currently subscribed to [email protected] as:
>>>>> [email protected]
>>>>> To unsubscribe, change settings or access archives, see
>>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>>
>>>>
>>>>
>>>> --
>>>> You are currently subscribed to [email protected] as:
>>>> [email protected]
>>>> To unsubscribe, change settings or access archives, see
>>>> http://www.ja-sig.org/wiki/display/JSG/cas-user
>>>>
>>>
>>>
>>
>

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to