[ 
https://issues.apache.org/jira/browse/CMIS-961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15266306#comment-15266306
 ] 

Bertrand Barraud commented on CMIS-961:
---------------------------------------

Okay guys, 
I've been digging a little bit more this morning.

I traced the headers on the failing call in file urllib2.py line 1214 ( See 
error above ).

I use a file under 2 megabyte (17kb), here is the header:
{'Content-Length': '17615', 'Host': '10.50.0.184:8081', 'User-Agent': 
'cmislib/%s +http://chemistry.apache.org/', 'Connection': 'close', 
'Content-Type': 'application/atom+xml;type=entry', 'Authorization': 'Basic 
YWRtaW46YWRtaW4='}

and one over 2 Mbytes (2.9Mb):
{'Content-Length': '2910072', 'Host': '10.50.0.184:8081', 'Content-Type': 
'application/atom+xml;type=entry', 'Connection': 'close', 'User-Agent': 
'cmislib/%s +http://chemistry.apache.org/'}

As you can see, the first one ( which work ) had an Authorization attribute, 
when the second one ( that fails ) had none...
I just forced it for my testing.. addind it all the time has the following :

 headers["Authorization"] = 'Basic YWRtaW46YWRtaW4='

And the script is now able to upload files over 2Mbytes.

It's of course not the way you should fix it, but it shows this is just an 
issue of configuration somewhere.
Just wanted to share you that before going back to my digging.
I will post again if I find a clean fix and what's really going on.


> Connection reset by peer when trying to upload a document over 2M to Alfresco 
> 5.0.d
> -----------------------------------------------------------------------------------
>
>                 Key: CMIS-961
>                 URL: https://issues.apache.org/jira/browse/CMIS-961
>             Project: Chemistry
>          Issue Type: Bug
>          Components: python-cmislib
>    Affects Versions: cmislib 0.5.1
>         Environment: Alfresco 5.0.d community edition on an Ubuntu 14.04 LTS 
> based system.
>            Reporter: Willem Ligtenberg
>            Assignee: Jeff Potts
>         Attachments: Sample-Bigish.pdf, Sample-Smallish.pdf
>
>
> Using Alfresco 5.0.a I was able to store large data files (up to 250M tested) 
> in Alfresco using:
> doc = repo.createDocument(remoteFile, props, folder, localFile, 
> properties['contentType'], None)
> Now, small files work, but any file larger than 2M fails.
> Uploading the same file using CMIS Workbench works fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to