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

  • Home
  • SEARCH
  • 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 8806899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T02:14:28+00:00 2026-06-14T02:14:28+00:00

I get the following response from a a UDP Socket: HTTP/1.1 200 OK CACHE-CONTROL:

  • 0

I get the following response from a a UDP Socket:

HTTP/1.1 200 OK
CACHE-CONTROL: max-age=1800
DATE: Thu, 08 Nov 2012 12:32:33 GMT
EXT:
LOCATION: http://192.168.0.100:49153/nmrDescription.xml
SERVER: Windows2000/0.0 UPnP/1.0 PhilipsIntelSDK/1.4 DLNADOC/1.50
X-User-Agent: redsonic
ST: upnp:rootdevice
USN: uuid:F00DBABE-SA5E-BABA-DADA188ED55ED539::upnp:rootdevice

Is there a library, or simple way to parse all this ?

I’d like to get something like the following:

{
  :cache_control => "max-age=1800"
  :date => "Thu, 08 Nov 2012 12:32:33 GMT"
  :ext => nil
  :location => "http://192.168.0.100:49153/nmrDescription.xml"
  # Etc.
}
  • 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-14T02:14:29+00:00Added an answer on June 14, 2026 at 2:14 am
    response.split($/).drop(1).inject({}) do |h, l|
      k, v = l.split(": ", 2)
      h[k.downcase.gsub("-", "_").to_sym] = (v unless v.empty?)
      h
    end
    
    # => {
    #  :cache_control=>"max-age=1800",
    #  :date=>"Thu, 08 Nov 2012 12:32:33 GMT",
    #  :ext=>nil,
    #  :location=>"http://192.168.0.100:49153/nmrDescription.xml",
    #  :server=>"Windows2000/0.0 UPnP/1.0 PhilipsIntelSDK/1.4 DLNADOC/1.50",
    #  :x_user_agent=>"redsonic",
    #  :st=>"upnp:rootdevice",
    #  :usn=>"uuid:F00DBABE-SA5E-BABA-DADA188ED55ED539::upnp:rootdevice"
    #}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following code to get response from a requested page using php
I am trying following, 1. Get response using Ajax from the users selection which
When consuming a .NET WCF webservice I get the following response (error): Unsupported HTTP
I get following XML string as a response from BING (Note:COMPOSITE result), i tried
I need to send a HTTP request (and get XML response) from Flash that
I'm using the following in the web page but can't get a response from
Consider this following code (that retrieves the response from a HTTP request and prints
I get the following response from the server after doing an ajax request: {error:false,success:true}
I am a new programmer. I get the following response from server. How can
I have the following response from server: {_license:false} And when I try to get

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.