Bug 126051 - Accessing XML-RPC over HTTP gives 302 redirect instead of XML-RPC fault
Summary: Accessing XML-RPC over HTTP gives 302 redirect instead of XML-RPC fault
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/Other
Version: rhn330
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jesus M. Rodriguez
QA Contact: Fanny Augustin
URL: https://rhn.redhat.com/
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-15 15:30 UTC by Daniel Berrangé
Modified: 2007-04-18 17:08 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-01-03 17:21:59 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2004-06-15 15:30:55 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4)
Gecko/20031008 Galeon/1.3.14

Description of problem:
The documentation describing how to use the XML-RPC API for RHN from
Perl illustrates connecting to 'http://rhn.redhat.com/rpc/api'. When
running the example code, however, the Frontier::Client module simply
exits with '302 Found'. Either the documentation for the API should be
updated to make it clear that the SSL URL should be used, or the
http:// server should provide an XML-RPC Fault reponse. One other
strange thing is that different behaviour is exhibited when connecting
to a RHN satellite server - where non-SSL connections work fine. Its
only rhn.redhat.com that appears to refuse non-SSL connections.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Run the code

use Frontier::Client;

my $client = Frontier::Client->new(
  url => "http://rhn.redhat.com/rpc/api", 
  use_objects => 1, 
  debug => 1);

print "System version ", $client->call("api.system_version"), "\n";


Actual Results:  <?xml version="1.0"?>
<methodCall>
<methodName>api.system_version</methodName>
<params>
</params>
</methodCall>
302 Found



Expected Results:  Either it should work as per SSL url:

---- request ----
<?xml version="1.0"?>
<methodCall>
<methodName>api.system_version</methodName>
<params>
</params>
</methodCall>
---- response ----
<?xml version="1.0"?>
<methodResponse>
<params>
<param><value><string>3.3.0</string></value></param>
</params>
</methodResponse>
System version Frontier::RPC2::String=SCALAR(0x81fd758)


Or should return a Fault with a message 'Should use SSL for API access'


Additional info:

See mailing list thread

http://post-office.corp.redhat.com/archives/tech-list/2004-June/msg00223.html


Note You need to log in before you can comment on or make changes to this bug.