I am upgrading a module from D6 to D7 and have stumbled over a problem with uploading files. I am using a java applet to collect the filenames and upload them. The applet requires a full URL (eg http://example.com/my/path/to/callback) as it is running on its own so it cannot *know* what FQDN to prepend to a relative path. The apache logs show a 404 file not found error and watchdog also logs the error like so: http://example.com/http://example.com/my/path/to/callback All this works well in D6 and I have been very careful in the upgrade. The callback never arrives. It looks like D7 assumes or even requires a relative path and is prepending http://example.com/ automatically. Any pointers would be much appreciated ;-) TIA -- ----------------- Bob Hutchinson Midwales dot com -----------------
Hi Bob - The first thing to do is to leave the java applet out of the equation. Just access your callback URL in a browser. Hit http://example.com/my/path/to/callback. Do you get a 404? Then your module is not properly implementing that path or you've failed to rebuild the menu router after changing the code. First, get the URL to respond to you (by either rebuilding the menu router/clearing all caches, or by fixing your code) and then try it out with your java applet. Good luck, -Randy On Sat, Jun 12, 2010 at 2:42 AM, Bob Hutchinson <hutchlists@midwales.com>wrote:
I am upgrading a module from D6 to D7 and have stumbled over a problem with uploading files.
I am using a java applet to collect the filenames and upload them. The applet requires a full URL (eg http://example.com/my/path/to/callback) as it is running on its own so it cannot *know* what FQDN to prepend to a relative path. The apache logs show a 404 file not found error and watchdog also logs the error like so: http://example.com/http://example.com/my/path/to/callback
All this works well in D6 and I have been very careful in the upgrade. The callback never arrives. It looks like D7 assumes or even requires a relative path and is prepending http://example.com/ automatically.
Any pointers would be much appreciated ;-)
TIA -- ----------------- Bob Hutchinson Midwales dot com -----------------
-- Randy Fay Drupal Module and Site Development randy@randyfay.com +1 970.462.7450
On Saturday 12 June 2010, Randy Fay wrote:
Hi Bob -
The first thing to do is to leave the java applet out of the equation. Just access your callback URL in a browser. Hit http://example.com/my/path/to/callback. Do you get a 404? Then your module is not properly implementing that path or you've failed to rebuild the menu router after changing the code. First, get the URL to respond to you (by either rebuilding the menu router/clearing all caches, or by fixing your code) and then try it out with your java applet.
I tried this by grabbing the destination url out of the java applet's param and it produced code 200 (success) in apache logs and reached the calback function. I have a watchdog in there ATM. I have been flushing caches after just about every change in code ;-) I used firefox and I tried the same URL with wget, both succeed. I also created a test page node with the url in it, that worked too. The applet remains the same, it never reaches the callback, the paths are identical to the D6 version. The applet uses POST and I do wonder if D7 is rejecting it because it has no 'record' of a form and sees no form_id.... Anyway thanks for your suggestions, it helped eliminate a few possibilities.
Good luck, -Randy
On Sat, Jun 12, 2010 at 2:42 AM, Bob Hutchinson
<hutchlists@midwales.com>wrote:
I am upgrading a module from D6 to D7 and have stumbled over a problem with uploading files.
I am using a java applet to collect the filenames and upload them. The applet requires a full URL (eg http://example.com/my/path/to/callback) as it is running on its own so it cannot *know* what FQDN to prepend to a relative path. The apache logs show a 404 file not found error and watchdog also logs the error like so: http://example.com/http://example.com/my/path/to/callback
All this works well in D6 and I have been very careful in the upgrade. The callback never arrives. It looks like D7 assumes or even requires a relative path and is prepending http://example.com/ automatically.
Any pointers would be much appreciated ;-)
TIA -- ----------------- Bob Hutchinson Midwales dot com -----------------
-- ----------------- Bob Hutchinson Midwales dot com -----------------
participants (2)
-
Bob Hutchinson -
Randy Fay