You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Phil Barr (Created) (JIRA)" <ji...@apache.org> on 2012/03/05 17:33:58 UTC
[jira] [Created] (CMIS-512) DotCMIS returns unexpected document
content when connected to SharePoint 2010 via AtomPub
DotCMIS returns unexpected document content when connected to SharePoint 2010 via AtomPub
-----------------------------------------------------------------------------------------
Key: CMIS-512
URL: https://issues.apache.org/jira/browse/CMIS-512
Project: Chemistry
Issue Type: Bug
Components: dotcmis
Affects Versions: DotCMIS 0.3
Environment: Sharepoint 2010
Reporter: Phil Barr
Same as this bug https://issues.apache.org/jira/browse/CMIS-264 but for DotCMIS.
SharePoint 2010 delivers document content base64 encoded. OpenCMIS doesn't honor the Content-Transfer-Encoding HTTP header and passes the encoded stream to the application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CMIS-512) DotCMIS returns unexpected document
content when connected to SharePoint 2010 via AtomPub
Posted by "Phil Barr (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222459#comment-13222459 ]
Phil Barr commented on CMIS-512:
--------------------------------
I changed the constructor that takes an HttpWebResponse in HTTP.Response in http.cs (line 175) to the following to fix this:
{code}
public Response(HttpWebResponse httpResponse)
{
this.response = httpResponse;
StatusCode = httpResponse.StatusCode;
Message = httpResponse.StatusDescription;
ContentType = httpResponse.ContentType;
ContentLength = httpResponse.ContentLength == -1 ? null : (long?)httpResponse.ContentLength;
string contentTransferEncoding = httpResponse.Headers["Content-Transfer-Encoding"];
bool isBase64 = contentTransferEncoding != null && contentTransferEncoding.Equals("base64", StringComparison.CurrentCultureIgnoreCase);
if (httpResponse.StatusCode == HttpStatusCode.OK ||
httpResponse.StatusCode == HttpStatusCode.Created ||
httpResponse.StatusCode == HttpStatusCode.NonAuthoritativeInformation ||
httpResponse.StatusCode == HttpStatusCode.PartialContent)
{
if (isBase64)
{
Stream = new BufferedStream(new CryptoStream(httpResponse.GetResponseStream(), new FromBase64Transform(), CryptoStreamMode.Read ));
}
else
{
Stream = new BufferedStream(httpResponse.GetResponseStream(), 64 * 1024);
}
}
else
{
try { httpResponse.Close(); }
catch (Exception) { }
}
}
{code}
> DotCMIS returns unexpected document content when connected to SharePoint 2010 via AtomPub
> -----------------------------------------------------------------------------------------
>
> Key: CMIS-512
> URL: https://issues.apache.org/jira/browse/CMIS-512
> Project: Chemistry
> Issue Type: Bug
> Components: dotcmis
> Affects Versions: DotCMIS 0.3
> Environment: Sharepoint 2010
> Reporter: Phil Barr
> Assignee: Florian Müller
> Labels: sharepoint
>
> Same as this bug https://issues.apache.org/jira/browse/CMIS-264 but for DotCMIS.
> SharePoint 2010 delivers document content base64 encoded. OpenCMIS doesn't honor the Content-Transfer-Encoding HTTP header and passes the encoded stream to the application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CMIS-512) DotCMIS returns unexpected document
content when connected to SharePoint 2010 via AtomPub
Posted by "Phil Barr (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224229#comment-13224229 ]
Phil Barr commented on CMIS-512:
--------------------------------
I have tested the latest in trunk against Sharepoint 2010 and it worked fine. Was able to put some Word documents on there and download them and open in Word fine. Found the biggest file I could find (14 MB) and could download it and it appeared to stream correctly without causing a large jump in memory usage or hangs.
> DotCMIS returns unexpected document content when connected to SharePoint 2010 via AtomPub
> -----------------------------------------------------------------------------------------
>
> Key: CMIS-512
> URL: https://issues.apache.org/jira/browse/CMIS-512
> Project: Chemistry
> Issue Type: Bug
> Components: dotcmis
> Affects Versions: DotCMIS 0.3
> Environment: Sharepoint 2010
> Reporter: Phil Barr
> Assignee: Florian Müller
> Labels: sharepoint
>
> Same as this bug https://issues.apache.org/jira/browse/CMIS-264 but for DotCMIS.
> SharePoint 2010 delivers document content base64 encoded. OpenCMIS doesn't honor the Content-Transfer-Encoding HTTP header and passes the encoded stream to the application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CMIS-512) DotCMIS returns unexpected document
content when connected to SharePoint 2010 via AtomPub
Posted by "Florian Müller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222553#comment-13222553 ]
Florian Müller commented on CMIS-512:
-------------------------------------
Thanks Phil!
I have incorporated your fix. Would you mind testing it? I don't have a SharePoint server available.
> DotCMIS returns unexpected document content when connected to SharePoint 2010 via AtomPub
> -----------------------------------------------------------------------------------------
>
> Key: CMIS-512
> URL: https://issues.apache.org/jira/browse/CMIS-512
> Project: Chemistry
> Issue Type: Bug
> Components: dotcmis
> Affects Versions: DotCMIS 0.3
> Environment: Sharepoint 2010
> Reporter: Phil Barr
> Assignee: Florian Müller
> Labels: sharepoint
>
> Same as this bug https://issues.apache.org/jira/browse/CMIS-264 but for DotCMIS.
> SharePoint 2010 delivers document content base64 encoded. OpenCMIS doesn't honor the Content-Transfer-Encoding HTTP header and passes the encoded stream to the application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CMIS-512) DotCMIS returns unexpected document
content when connected to SharePoint 2010 via AtomPub
Posted by "Florian Müller (Commented JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224361#comment-13224361 ]
Florian Müller commented on CMIS-512:
-------------------------------------
Thanks! I will mark this issue as resolved.
> DotCMIS returns unexpected document content when connected to SharePoint 2010 via AtomPub
> -----------------------------------------------------------------------------------------
>
> Key: CMIS-512
> URL: https://issues.apache.org/jira/browse/CMIS-512
> Project: Chemistry
> Issue Type: Bug
> Components: dotcmis
> Affects Versions: DotCMIS 0.3
> Environment: Sharepoint 2010
> Reporter: Phil Barr
> Assignee: Florian Müller
> Labels: sharepoint
> Fix For: DotCMIS 0.4
>
>
> Same as this bug https://issues.apache.org/jira/browse/CMIS-264 but for DotCMIS.
> SharePoint 2010 delivers document content base64 encoded. OpenCMIS doesn't honor the Content-Transfer-Encoding HTTP header and passes the encoded stream to the application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CMIS-512) DotCMIS returns unexpected document
content when connected to SharePoint 2010 via AtomPub
Posted by "Florian Müller (Assigned JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florian Müller reassigned CMIS-512:
-----------------------------------
Assignee: Florian Müller
> DotCMIS returns unexpected document content when connected to SharePoint 2010 via AtomPub
> -----------------------------------------------------------------------------------------
>
> Key: CMIS-512
> URL: https://issues.apache.org/jira/browse/CMIS-512
> Project: Chemistry
> Issue Type: Bug
> Components: dotcmis
> Affects Versions: DotCMIS 0.3
> Environment: Sharepoint 2010
> Reporter: Phil Barr
> Assignee: Florian Müller
> Labels: sharepoint
>
> Same as this bug https://issues.apache.org/jira/browse/CMIS-264 but for DotCMIS.
> SharePoint 2010 delivers document content base64 encoded. OpenCMIS doesn't honor the Content-Transfer-Encoding HTTP header and passes the encoded stream to the application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CMIS-512) DotCMIS returns unexpected document
content when connected to SharePoint 2010 via AtomPub
Posted by "Florian Müller (Resolved JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CMIS-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Florian Müller resolved CMIS-512.
---------------------------------
Resolution: Fixed
Fix Version/s: DotCMIS 0.4
> DotCMIS returns unexpected document content when connected to SharePoint 2010 via AtomPub
> -----------------------------------------------------------------------------------------
>
> Key: CMIS-512
> URL: https://issues.apache.org/jira/browse/CMIS-512
> Project: Chemistry
> Issue Type: Bug
> Components: dotcmis
> Affects Versions: DotCMIS 0.3
> Environment: Sharepoint 2010
> Reporter: Phil Barr
> Assignee: Florian Müller
> Labels: sharepoint
> Fix For: DotCMIS 0.4
>
>
> Same as this bug https://issues.apache.org/jira/browse/CMIS-264 but for DotCMIS.
> SharePoint 2010 delivers document content base64 encoded. OpenCMIS doesn't honor the Content-Transfer-Encoding HTTP header and passes the encoded stream to the application.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira