What steps will reproduce the problem?
1. access a service document which requires authentication
2. apexer will fail saying it expects a 200 http return code
As the session is created in the service method itself, I don't know how to
cleanly adapt the code to support authenticated service document retrieval.
This patch just makes it work:
Index: apexer
===================================================================
--- apexer (revisión: 933)
+++ apexer (copia de trabajo)
@@ -117,8 +117,16 @@
session = _Session()
session.credentials = options.credentials
session.cache = options.cache
+
h = Http(session.cache)
session.context = Context(http=h, service=args[0])
+ if session.credentials:
+ f = file(session.credentials, "r")
+ name, password = f.read().split()[0:2]
+ f.close()
+ session.context.http.add_credentials(name, password)
+
+
s = Service(session.context)
headers, body = s.get()
if headers.status == 200:
Original issue reported on code.google.com by luis.per...@gmail.com on 11 Jan 2008 at 11:00
Original issue reported on code.google.com by
luis.per...@gmail.com
on 11 Jan 2008 at 11:00