Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8749909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:46:19+00:00 2026-06-13T12:46:19+00:00

I have a small yaws appmod test: -module(webservice). -include(../include/yaws_api.hrl). -compile(export_all). http(parse_query,Arg) -> yaws_api:parse_query(Arg); out(Arg)

  • 0

I have a small yaws appmod test:

-module(webservice).
-include("../include/yaws_api.hrl").
-compile(export_all).

http(parse_query,Arg) ->
    yaws_api:parse_query(Arg);

out(Arg) -> 
    {html, [http(parse_query,Arg)]}.

When the yaws_api:parse_query function is ran I get the following ERROR REPORT from the yaws interactive mode:

Yaws process died: {function_clause,
                   [{yaws_server,binary_size,
                        [0,{"i",undefined}],
                        [{file,"yaws_server.erl"},{line,3015}]},
                    {yaws_server,binary_size,2,
                        [{file,"yaws_server.erl"},{line,3018}]},
                    {yaws_server,binary_size,2,
                        [{file,"yaws_server.erl"},{line,3018}]},
                    {yaws_server,deflate_accumulated,4,
                        [{file,"yaws_server.erl"},{line,3712}]},
                    {yaws_server,deliver_accumulated,4,
                        [{file,"yaws_server.erl"},{line,3666}]},
                    {yaws_server,finish_up_dyn_file,2,
                        [{file,"yaws_server.erl"},{line,2745}]},
                    {yaws_server,aloop,4,
                        [{file,"yaws_server.erl"},{line,1175}]},
                    {yaws_server,acceptor0,2,
                        [{file,"yaws_server.erl"},{line,1016}]}]}

The appmod is setup in config with:

<server localhost>
    port = 8080
    listen = 127.0.0.1
    #docroot = /usr/share/yaws
    docroot = /usr/lib/yaws/www
    appmods = </,webservice>
    # dir_listings = true
</server>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:46:20+00:00Added an answer on June 13, 2026 at 12:46 pm

    Though you don’t show it, it looks like the URL you’re trying to access has a query string with at least one variable named i, something like this:

    http://example.com/foo?i=10
    

    For that URL, yaws_api:parse_query/1 will return [{"i","10"}], which you’re then trying to return to Yaws as HTML using the {html, iolist()} construct. Unfortunately, [{"i","10"}] is not an iolist, string, or binary, so Yaws fails.

    You can fix this by converting [{"i","10"}] to a string using the yaws_api:f/2 call, like this:

    out(Arg) ->
        {html, yaws_api:f("~p", [http(parse_query,Arg)])}.
    

    or using the standard io_lib:format/2 call:

    out(Arg) ->
        {html, io_lib:format("~p", [http(parse_query,Arg)])}.
    

    The yaws_api:f/2 function is just a wrapper around io_lib:format/2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have small test app: Socket socket = new Socket(jeck.ru, 80); PrintWriter pw =
Have small web page at www.peterbio.com/mom/test.htm Someone wrote the code with mouse over and
I have small application that is uploading pictures to another website via webservice. My
I have small problem with http 404 error, after click on 'allow' on facebook
I have small problem. when i include file without ob_start, head's codes comes in
I have small HTTP server script that receives HTTP client requests and replies. I
I have small application: http://jsfiddle.net/Bwdf6/4/ But with click on delete, tags that created after
have small problem, and would very much appreciate help :) I should convert byte
I have small query today I happen to see when I typed a website
I have small question by entity framework 4.1. There is interface of image DTO:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.