Project

General

Profile

Actions

Bug #4462

open

Redirection not working when accessing from another host

Added by Pau Garcia i Quiles over 8 years ago. Updated over 8 years ago.

Status:
Feedback
Priority:
Normal
Assignee:
Benoit Daccache
Target version:
Start date:
09/08/2015
Due date:
% Done:

0%

Estimated time:

Description

I received this as Debian bug #798332 but I'd say the problem lives in Wt itself, not in the packaging.

If you build the attached Wt application, it works fine if you access it from the same host where it runs.

But if you run the application in, say, a VM, and access it from another computer, what you'll see in your browser is a blank page. When you tell the browser to "View Source", you'll see the page is not empty: it's just the redirection failed. If you disable JavaScript, you'll get the Basic HTML version.

Steps to reproduce a working situation:

1. Build the attached application

  1. Start it on your local host
  2. Start a browser on your local host
  3. Access http://localhost:8080
  4. It works fine ("Hello" message displayed)

Steps to reproduce a faulty situation:

1. Build the attached application in a VM with IP address of, say, 192.168.1.100

  1. Start the application in the VM with no parameters (i. e. it will listen on 0.0.0.0:8080)
  2. Start a browser on your local host
  3. Access http://192.168.1.100:8080
  4. Blank page (if JavaScript enabled)

Files

CMakeLists.txt (122 Bytes) CMakeLists.txt Pau Garcia i Quiles, 09/08/2015 02:14 PM
main.cpp (962 Bytes) main.cpp Pau Garcia i Quiles, 09/08/2015 02:14 PM
Actions #1

Updated by Koen Deforche over 8 years ago

  • Status changed from New to InProgress
  • Assignee set to Benoit Daccache
Actions #2

Updated by Benoit Daccache over 8 years ago

  • Target version changed from 3.3.4 to 3.3.5

I compiled and run the code on my machine and tried to access it from another machine (a Vm and another desktop) and both were working perfectly.

Can you give me more informations on you wt_config ?

I'm using the latest git version.

Can you maybe try with the latest git version to see if you can reproduce the problem ?

Thank you,

Benoit

Actions #3

Updated by Pau Garcia i Quiles over 8 years ago

It's a standard wt_config.xml, no changes. The only difference from the wt_config.xml.in in git is the run-directory is set:

--8<---

$ diff -upd wt_config.xml.in /etc/wt/wt_config.xml

---- wt_config.xml.in 2014-08-26 23:22:46.000000000 +0200

  • /etc/wt/wt_config.xml 2015-05-06 18:56:30.000000000 +0200
    @@ --130,7 +130,7 @@

Path used by Wt to do session management.

--->

  • ${RUNDIR}
  • /var/run/wt

<!--- Number of threads per process

--8<---

Actions #4

Updated by Pau Garcia i Quiles over 8 years ago

Oh well, so much for formatting...

--8<---

 diff -upd wt_config.xml.in /etc/wt/wt_config.xml 
--- wt_config.xml.in    2014-08-26 23:22:46.000000000 +0200
+++ /etc/wt/wt_config.xml       2015-05-06 18:56:30.000000000 +0200
@@ -130,7 +130,7 @@

                Path used by Wt to do session management.
              -->
-           <run-directory>${RUNDIR}</run-directory>
+           <run-directory>/var/run/wt</run-directory>

            <!-- Number of threads per process

--8<---

Actions #5

Updated by Benoit Daccache over 8 years ago

I still can't reproduce the problem...

Can you try with latest git version ?

Actions #6

Updated by ioann sys over 8 years ago

Benoit Daccache wrote:

I still can't reproduce the problem...

Can you try with latest git version ?

I try next steps:

  1. apt-get purge witty-*
  2. download source witty-3.3.5-rc1 from http://www.webtoolkit.eu/wt/download page.
  3. comile and install it.
  4. So, problem dont fixed.

If i disable java in web browser chromium, this primitive code has work.

Actions #7

Updated by Wim Dumon over 8 years ago

Hello Pau,

Please check this thread:

http://redmine.emweb.be/boards/1/topics/11257

Is Wt JS minified as part of packaging it for debian?

Wim.

Actions #8

Updated by Koen Deforche over 8 years ago

  • Status changed from InProgress to Feedback
Actions

Also available in: Atom PDF