Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > RFuzz::HttpClient hangs on meta refresh

Reply
Thread Tools

RFuzz::HttpClient hangs on meta refresh

 
 
Adam Traver
Guest
Posts: n/a
 
      07-10-2007
I have to integrate some code with a client who uses SalesForce as its
CRM, and I've noticed something that might be RFuzz-related when
working with the request.

SalesForce's WebToLead service waits for HTTP POSTs to come in and
translates those into new entries in its system. If you do a curl as
such:

curl -d '' 'http://www.salesforce.com/servlet/servlet.WebToLead'

You'll get an empty response with a 200 status.

However, apparently SalesForce lets you provide a "retURL" key in the
request body, and it'll give you back a response with a meta refresh
tag:

curl -d 'retURL=http://www.google.com' 'http://www.salesforce.com/
servlet/servlet.WebToLead'

The response will be something like this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<meta http-equiv="Refresh" content="0; URL=http://www.google.com">
</head>
<script>
if (window.location.replace){
window.location.replace('http://www.google.com');
} else {;
window.location.href ='http://www.google.com';
}
</script>
</html>

Whenever I try this through RFuzz's HttpClient, however, it hangs on
me:

uri = URI.parse('http://www.salesforce.com/servlet/servlet.WebToLead')
client = RFuzz::HttpClient.new(uri.host, uri.port)
client.post(uri.path, :body => 'retURL=http://www.google.com') # <--
Hangs

Even when providing ":redirect => false" to client.post, it still
hangs.

Any ideas?

Thanks,
Adam


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Meta-Meta-Programming, revisited Erik Veenstra Ruby 21 07-25-2006 10:26 PM
Meta-Meta-Programming Erik Veenstra Ruby 29 02-08-2006 08:22 PM
Meta methods to govern meta data? Duane Johnson Ruby 6 10-28-2005 03:57 AM
Clear hangs up - & hangs up - & hangs up Sue Bilstein NZ Computing 26 03-07-2004 01:33 AM
META NAME and META HTTP-EQUIV Nym Pseudo HTML 1 09-26-2003 09:13 AM



Advertisments