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 6686049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:07:38+00:00 2026-05-26T05:07:38+00:00

I’m using RingoJS 0.8, and I created a basic jsgi application on top of

  • 0

I’m using RingoJS 0.8, and I created a basic jsgi application on top of a ringo/httpserver instance. I’m trying to understand the purpose of each key in a jsgi request object according to the spec: http://wiki.commonjs.org/wiki/JSGI/Level0/A/Draft2; and I understood most of the keys, save the scriptName key.

When I run my application and print the values of each key, scriptName always returns an empty string while pathInfo returns the pathname of the URL. I’m trying to understand what scriptName’s actually supposed to convey and how’s it’s intended to be different from pathInfo.

  • 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-05-26T05:07:38+00:00Added an answer on May 26, 2026 at 5:07 am

    scriptName and pathInfo are best understood when taking the historic background of CGI into account, as that’s where those fields stem from.

    With CGI scripts, you have a server-side directory structure, which contains a CGI script in some location. For CGIs, the job of the web server is to map the URLs in HTTP requests to CGI scripts. Now this mapping process basically splits the path in the URL into components, and then tries (starting at a root directory) to map each component to a directory name or a filename. Once a component is matched to a filename, the CGI script to execute is found. All URL path components leading up to and including the filename are then passed as the “script name” to the CGI, remaining (unmatched) URL path compoments are passed to the CGI script as “path info”.

    Let’s illustrate this abstract description with an example. Let’s assume you have a CGI script stored in your filesystem at /x/y/foo/bar.cgi, where /x/y/ is the root directory used by your webserver to map requests to. If a request comes in for the URL /foo/bar.cgi/baz/qux, the webserver will match this rquest to the /x/y/foo/bar.cgi CGI script, passing /foo/bar.cgi as “script name” and the remaining /baz/qux as “path info” to this CGI script.

    However, in JSGI it’s basically up to the server and potential middleware how the mapping of URLs to JSGI apps is done. There might be an analogue file system-based lookup mechanism at work, where splitting the original request’s path into “script name” and “path info” still makes sense. Or there might not be.

    If you run atop Ringo’s bare ringo/httpserver, no script name mapping is done at all, as your app is always considered to be running at the root (i.e. corresponding to the / URL path). If your main app delegates to other JSGI apps, it’s then up for you to decide (and document) if and how you set scriptName and pathInfo.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm making a simple page using Google Maps API 3. My first. One marker
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am trying to loop through a bunch of documents I have to put

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.