#015431: ezcWebdavAutomaticPathFactory uses hard coded http - https connection fails

Description:

Hi!

Another one ;)
You are using ezcWebdavAutomaticPathFactory as default PathFactory, so I assume it should work in as many environments as possible.

See http://svn.ez.no/svn/ezcomponents/trunk/Webdav/src/path_factories/automatic.phpurl down at the bottom, in line 155:

return 'http://' . $_SERVER['SERVER_NAME']

should be dynamic choose between ports and protocols, as the ezcWebdavBasicPathFactory already does.


Environment:

ezcomponents-2009.1.1


Steps to Reproduce:

http://svn.ez.no/svn/ezcomponents/trunk/Webdav/src/path_factories/automatic.phpurl
line 155

return 'http://' . $_SERVER['SERVER_NAME']


- Attachments

No attachments for this issue.


- Comments

This fixes the problem for me:

public function generateUriFromPath( $path )
{

return ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://')
. $_SERVER['SERVER_NAME']
. $this->serverFile
. $path
. ( isset( $this->collectionPathes[$path] ) ? '/' : '' );
}

But I don't know whether this is Apache specific.
Probably you better want to get the used protocol from the current request?

#262999 by Kevin P. on September 4th, 2009 [Permanent Link]

Fixed in rev. #10923.

#263132 by Tobias Schlitt on September 14th, 2009 [Permanent Link]

- History
Properties
Type Bug
Priority Medium
Component Components » Webdav
Affects 2009.1.1 - eZ components 2009.1.1
Fix Versions 2009.2 sprint 3 - eZ components 2009.2 sprint 3
2009.2alpha1 - eZ components 2009.2alpha1
Reporter Kevin P.
Responsible Tobias Schlitt
Status 0 Closed
Resolution Fixed
Created September 4th, 2009
Updated September 14th, 2009
Resolved September 14th, 2009
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels