OpenLayers OpenLayers

Ticket #1350 (closed bug: fixed)

Opened 2 years ago

Last modified 2 years ago

Ajax.Request does not use OpenLayers.ProxyHost

Reported by: crschmidt Assigned to:
Priority: minor Milestone: 2.6 Release
Component: Ajax Version: 2.5
Keywords: Cc:
State: Needs Discussion

Description

OpenLayers.loadURL uses an OpenLayers.ProxyHost setting to redirect requests made to remote servers. However, when using Ajax.Request directly (as is necessary when you need more control over your requests), this setting isn't used. This is not obvious to users, and should be changed.

(This is somewhat necessary to better support the "Untiled Overlays" case for the MapGuide layer, which currently uses Ajax.Request, but does not do anything with ProxyHost, which is a problem.)

Attachments

ajax.patch (1.0 kB) - added by crschmidt on 02/10/08 09:37:19.
ajax-uri-typo.diff (0.6 kB) - added by rdewit on 02/10/08 19:23:21.
This patch fixes a typo

Change History

02/10/08 09:37:19 changed by crschmidt

  • attachment ajax.patch added.

02/10/08 09:37:52 changed by crschmidt

  • state set to Review.

02/10/08 15:53:22 changed by elemoine

  • state changed from Review to Commit.

Makes perfect sense to me. Please commit.

02/10/08 15:57:42 changed by crschmidt

  • status changed from new to closed.
  • state changed from Commit to Complete.
  • resolution set to fixed.

(In [6184]) Move ProxyHost addition to Ajax.Request instead of OpenLayers.loadURL. Makes it easier to write more complex apps that require ajax.request stuff without duplication of code. r=elemoine (Closes #1350)

02/10/08 19:23:21 changed by rdewit

  • attachment ajax-uri-typo.diff added.

This patch fixes a typo

02/10/08 19:26:55 changed by rdewit

  • status changed from closed to reopened.
  • state changed from Complete to Review.
  • resolution deleted.

r6184 introduced a typo ('uri' instead of 'url'). This patch fixes it (against trunk).

BTW: we should document this change in behaviour clearly. At Lisasoft we have a few apps that have worked around the 'bug' in Ajax.Request not taking ProxyHost into account and I can imagine that this change will break other people's apps too.

02/10/08 19:34:05 changed by crschmidt

  • status changed from reopened to closed.
  • state changed from Review to Complete.
  • resolution set to fixed.

Applied. As discussed on IRC, under all the ProxyHost settings we document and encourage, this won't be a problem, because hte proxyhost is relative: if users are applying them at the application level, the check in Ajax.Request will fail. If this is not the case, there is a possibility that the Proxyhost could be applied twice, and this is documented in the 2.6 release notes.

02/12/08 11:32:18 changed by tschaub

  • status changed from closed to reopened.
  • resolution deleted.

This breaks the test_Ajax.html page.

02/12/08 11:34:11 changed by crschmidt

  • state changed from Complete to Needs Discussion.

r6229 fixes the broken test for me. Confirm?

02/12/08 11:37:02 changed by tschaub

  • status changed from reopened to closed.
  • resolution set to fixed.

yup, I tried to commit the same change at the same time