Hi Rajesh,

The access logs are written in the NCSA combined log format; I'm not sure what 
log viewer you're using, but it's doing some parsing of that file, and it's not 
clear how the columns map from the log file format to the columns you're 
mentioning.  You might need to configure your log viewer to handle that format 
better.

Re: the 401s, the REST server uses digest authentication by default, which does 
an authentication "handshake" before accepting the request.  So you should 
expect to see in the access log first an authentication challenge then the 
response.

To see what I mean, you can run a curl request with the -i flag on for verbose 
output, and you'll see both a 401 then the final response (typically 201 or 
204).

--Colleen
________________________________
From: [email protected] 
[[email protected]] on behalf of Rajesh Kumar 
[[email protected]]
Sent: Friday, October 25, 2013 4:35 AM
To: [email protected]
Subject: [MarkLogic Dev General] PUT method in RESTFUL service giving 401 
response

Hi,

We are trying to migrate data from one environment into another, while doing so 
we are receiving 401 responses some times.


Query:
xdmp:http-put("http://remoreserver_rest_service:9000//v1/documents?uri=/test.xml";,
     <options xmlns="xdmp:http">
<authentication method="digest">
 <username>{$userName}</username>
 <password>{$password}</password>
</authentication>
<data>{xdmp:quote("<testing/>")}</data>
<headers>
 <content-type>application/xml</content-type>
</headers>
     </options>
     )

Access LOG:


Source IP

User

Date

Time

Column 5

Request

Response2

Column8

Column10

localhost

25/10/13

01:12:43

400


PUT /v1/documents?uri=/test.xml HTTP/1.1

401

211


Can you let me know what does column 5,8 and 10 specify?


Thanks & Regards,
Rajesh
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to