1. domruf
  2. hgssoauthentication
  3. Issues
Issue #2 resolved

Problem with PUSH-ing

Jaroslav Beran
created an issue

Hello,

I am trying to setup SSO on two different servers based on Tomcat and Httpd 2.0. Result is quite similar - I am able PULL without any trouble. But PUSH doesnt work. I cannot find working solution on Internet. Here are details:

Tomcat server:

  • Windows 2003 Server std
  • Apache Tomcat 7
  • Jespa 1.1.19
  • Python 2.7.6
  • Mercurial 2.8

Apache HTTPd 2.0 server:

  • Windows 2003 Server std
  • Apache HTTPd 2.2.17
  • mod_auth_sspi.so
  • Python 2.7.6
  • Mercurial 2.8

PULL works without trouble in both cases. PUSH works without SSO, but faild with SSO on:

In case of Tomcat server:

%hg --debug --repository C:\Users\jaroslav_b\Documents\hg_repos\Project1 push http://hg.elitgroup.net:8080/test/Project1/

pushing to http://hg.elitgroup.net:8080/test/Project1/
using http://hg.elitgroup.net:8080/test/Project1/
sending capabilities command
query 1; heads
sending batch command
searching for changes
all remote heads known locally
sending branchmap command
sending branchmap command
preparing listkeys for "bookmarks"
sending listkeys command
1 changesets found
list of changesets:
6773bcbab7fdcd470c5edf2021a9d2119143b52d
bundling: 1/1 changesets (100.00%)
bundling: 1/1 manifests (100.00%)
bundling: pom.xml 1/1 files (100.00%)
sending unbundle command
sending 345 bytes
sending: 0 kb
sending: 0 kb
requested URL: 'http://hg.elitgroup.net:8080/test/Project1/?cmd=unbundle'
abort: 'http://hg.elitgroup.net:8080/test/Project1/' does not appear to be an hg
 repository:
---%<--- (no content-type)

---%<---
!

In case of HTTPd server:

<html><head>
<title>413 Request Entity Too Large</title>
</head><body>
<h1>Request Entity Too Large</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
 webmaster@dummy-host2.elitgroup.net and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
</body></html>

In error log there are following records:

[Wed Nov 20 15:00:43 2013] [error] [client 10.11.3.30] Invalid Content-Length
[Wed Nov 20 15:00:43 2013] [error] [client 10.11.3.30] (-3)Unknown error: Error reading request entity data

Jaroslav Beran

Comments (10)

  1. domruf repo owner

    "413 Request Entity Too Large" indicates that you have so increase the LimitRequestFieldSize setting in apache (don't know the setting for tomcat t the moment). Kerberos authentication lets your headers grow significantly.

  2. Jaroslav Beran reporter

    My testing project has 8 kB in total. I set limit 10M (LimitRequestFieldSize 10485760) but result is the same. In my oppinion right reason is in Apache log:

    [Wed Nov 20 15:00:43 2013] [error] [client 10.11.3.30] Invalid Content-Length
    [Wed Nov 20 15:00:43 2013] [error] [client 10.11.3.30] (-3)Unknown error: Error reading request entity data
    

    I noticed in your source code you are sending content length 0:

    h.putheader('Content-Length', '0')
    

    Could it be reason?

  3. domruf repo owner

    Okay what kind of mercurial server do you have? Does it run in the same apache instance or is the apache only a reverse proxy?

  4. domruf repo owner

    OK you are right the Content-Length is (part of) the problem. I don't use NTLM anymore so I didn't run into with problem yet. But my code only works with PULL (GET requests) I will fix it this evening or tomorrow.

  5. Jaroslav Beran reporter

    Hello Dominik,

    I have tested your fix and it works well in both cases (Tomcat and Apache). Thank you very much for your fast reaction.

    This extension is really useful and I hope it will become part of Mercurial core.

    Jarda

  6. Log in to comment