Giter Club home page Giter Club logo

Comments (4)

klacke avatar klacke commented on May 13, 2024

Need more info, I don't understand exactly what the problem is.

from yaws.

Tyra-Bjurman avatar Tyra-Bjurman commented on May 13, 2024

With my normal server configuration:
<server localhost>
port = 8080
listen = 0.0.0.0
deflate = true
docroot = /home/dev/hp
appmods = </, conductor>
</server>

Using the appmod file:
$ cat conductor.erl

-module(conductor).

-include("yaws_api.hrl").

-export([out/1]).

out(A) -> {yssi, "test.yaws"}.

And in the docroot folder I have:
$ cat test.yaws

<erl>
out(A) -> {html, "this is test.yaws in docroot"}.
</erl>

Calling the appmod gives me no results from the yssi:
$ curl http://127.0.0.1:8080/

$

However if I changes
appmods = </, conductor> to appmods = <myappmod, conductor>

And calls the appmod, the yssi works:
$ curl http://127.0.0.1:8080/myappmod

this is test.yaws in docroot
$

So in short returning {yssi, Filename} values from an appmod that uses / as the trigger does not work.

from yaws.

klacke avatar klacke commented on May 13, 2024

Thanks, good report now. I'll try to make time to have a look at this.

from yaws.

klacke avatar klacke commented on May 13, 2024

I had a look at this and this is not easy to fix, the return value {yssi, "test.yaws"}
will turn into appmod processing once again since there is an appmod at top.
The code was never written for this case to work.

I'd prefer to not fix this.

Sorry

from yaws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.