ARMweb serving other files types
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
ARMweb serving other files types
#1 - The ability to select wether the ArmWeb throws a
on the end of printed
data.
a) "Print" adds the
b) "PrintR" would just dump the variable
This would maintain compatibility while adding the ability to do more complex
outputs such as XML files.
#2 - Add the ability for the pre-processor Webbasic to process other file types
and to set the file type in the headder.
a) a basic command like Header(0), Header(1), Each time it is called it adds a
raw header line. When invoked the programmer is rewured to provide all headers
for file.
b) if the pre processor see's htm, html, xml it would process the basic web
commands.
Thanks, The
is really making it hard to output an XML file with data
colected
on the end of printed
data.
a) "Print" adds the
b) "PrintR" would just dump the variable
This would maintain compatibility while adding the ability to do more complex
outputs such as XML files.
#2 - Add the ability for the pre-processor Webbasic to process other file types
and to set the file type in the headder.
a) a basic command like Header(0), Header(1), Each time it is called it adds a
raw header line. When invoked the programmer is rewured to provide all headers
for file.
b) if the pre processor see's htm, html, xml it would process the basic web
commands.
Thanks, The
is really making it hard to output an XML file with data
colected
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
There will be a firmware version available later this weekend that does no
conversion of characters inside the so
will not be emitted,
unless the BASIC code has it as part of a string, like
PRINT 1234;"
"
This gives the user the flexability to control the ASCII that comes out.
Just like this processing caused an issue, why would you want the ARMweb to
insert canned headers. They would never be what you want in some circumstance,
and the user htm/html/xml file now has complete control over what is "served
up", including the header.
conversion of characters inside the so
will not be emitted,
unless the BASIC code has it as part of a string, like
PRINT 1234;"
"
This gives the user the flexability to control the ASCII that comes out.
Just like this processing caused an issue, why would you want the ARMweb to
insert canned headers. They would never be what you want in some circumstance,
and the user htm/html/xml file now has complete control over what is "served
up", including the header.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
You keep refering to the ability to set my own headers. I can not find this
anywhere documented.
Currently when the ArmWeb is asked for a document the only response header sent
out is:
HTTP/1.0 200 OK
What I would like to add is the ability to send other headers out with the file
such as:
Content-Type: text/html; charset=iso-8859-1
or many other header's that would allow better control of the cache of the files
on the remote end.
I even tried to add the header to the top of the file but it came out as text on
the screem.
Since the webBasic processor will only process .htm files this header would
allow me to force a content type of XML and after the firmware update you are
refering to I would be able to generate xml files with the data from the device.
I just want to make clear when I am talking about headers I am not refering to
HTML headers.
I am refering to Server Response Headers
http://en.wikipedia.org/wiki/List_of_HTTP_header_fields
anywhere documented.
Currently when the ArmWeb is asked for a document the only response header sent
out is:
HTTP/1.0 200 OK
What I would like to add is the ability to send other headers out with the file
such as:
Content-Type: text/html; charset=iso-8859-1
or many other header's that would allow better control of the cache of the files
on the remote end.
I even tried to add the header to the top of the file but it came out as text on
the screem.
Since the webBasic processor will only process .htm files this header would
allow me to force a content type of XML and after the firmware update you are
refering to I would be able to generate xml files with the data from the device.
I just want to make clear when I am talking about headers I am not refering to
HTML headers.
I am refering to Server Response Headers
http://en.wikipedia.org/wiki/List_of_HTTP_header_fields
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
> What I would like to add is the ability to send other headers out with the
file such as:
>
> Content-Type: text/html; charset=iso-8859-1
>
> or many other header's that would allow better control of the cache of the
files on the remote end.
>
> I even tried to add the header to the top of the file but it came out as text
on the screem.
This is exactly the same head as shown in the example page at
http://www.coridium.us/ARMhelp/scr/Webservices.html
The prior file that you sent us had other errors in the head of the html page
that caused the various browsers to dump it as text.
file such as:
>
> Content-Type: text/html; charset=iso-8859-1
>
> or many other header's that would allow better control of the cache of the
files on the remote end.
>
> I even tried to add the header to the top of the file but it came out as text
on the screem.
This is exactly the same head as shown in the example page at
http://www.coridium.us/ARMhelp/scr/Webservices.html
The prior file that you sent us had other errors in the head of the html page
that caused the various browsers to dump it as text.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
I understand why my prev site had issues and this was one of them due to the
lack of server headers.
I understand on valid http html pages the content meta tag solves this issue.
Howevert to generate xml code that can have embeded Webbasic I have to use the
.htm as the ending. Since I can not set the server resonse headers and the code
below is not valid (no meta tags in xml)
lack of server headers.
I understand on valid http html pages the content meta tag solves this issue.
Howevert to generate xml code that can have embeded Webbasic I have to use the
.htm as the ending. Since I can not set the server resonse headers and the code
below is not valid (no meta tags in xml)
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
Remember you're running on a micro with 512K of Flash and 32K of RAM and not a
server with 1GB of memory and hard disks.
PHP is not going to running on it.
We aren't going to be able to support all the HTTP 1.1 features, and we'll stick
with a HTTP 1.0 OK response.
We could do something like looking at the first character of the file being
served and if it some special character, the blank line following HTTP 1.0 OK
would be omitted and then whatever is in the file minus that special character
would be sent out. That page would have to have that blank line between
response and file content or really weird things would happen.
server with 1GB of memory and hard disks.
PHP is not going to running on it.
We aren't going to be able to support all the HTTP 1.1 features, and we'll stick
with a HTTP 1.0 OK response.
We could do something like looking at the first character of the file being
served and if it some special character, the blank line following HTTP 1.0 OK
would be omitted and then whatever is in the file minus that special character
would be sent out. That page would have to have that blank line between
response and file content or really weird things would happen.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
I understand and don't expect php to run, I only included as an example.
I have found a workaround but a simple way to add this fucntion
The armw web would start to load the file see the
and the armweb would start to output the normal rest of the
file.
If the arm web has already seen any tex before the header fld it would just
ignore.
But as you said this is a simple device and I will just deal with the issue.
I have found a workaround but a simple way to add this fucntion
The armw web would start to load the file see the
and the armweb would start to output the normal rest of the
file.
If the arm web has already seen any tex before the header fld it would just
ignore.
But as you said this is a simple device and I will just deal with the issue.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
7.45 version of the firmware will show up in the files section of this forum
later today.
The statements will do no filtering of characters.
We have added .xml files to the file types that support
An experimental feature (it may not be permanent) has been added.
If the first character of the file being served is $01 (hex - SOH), then the
blank line following the
HTTP/1.0 200 OK
is not sent, and instead the file is sent so you can create your own HTTP
response. Be sure to include a blank line before the actual data you want sent
out. There is no syntax checking here, and there won't be, so if there are
errors in your file, you will probably need wireshark or something similar to
debug them. If this feature turns out to be useful, it may become permanent,
though the syntax may change.
To get that $01, in some text editors hold ALT key, on the numeric pad type 1,
release the ALT key. This works in Notepad, but NOT the Crimson editor.
later today.
The statements will do no filtering of characters.
We have added .xml files to the file types that support
An experimental feature (it may not be permanent) has been added.
If the first character of the file being served is $01 (hex - SOH), then the
blank line following the
HTTP/1.0 200 OK
is not sent, and instead the file is sent so you can create your own HTTP
response. Be sure to include a blank line before the actual data you want sent
out. There is no syntax checking here, and there won't be, so if there are
errors in your file, you will probably need wireshark or something similar to
debug them. If this feature turns out to be useful, it may become permanent,
though the syntax may change.
To get that $01, in some text editors hold ALT key, on the numeric pad type 1,
release the ALT key. This works in Notepad, but NOT the Crimson editor.
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
Thank You. You have made my app less comlicated.
1) Print command works great
2) xml & webbasic command works great
However #3 doesn't work or I am mis-understanding the application of it.
I placed the ALT 1 in notepad as the first character.
I made the next line the Response Header I wanted
I left a blank line and then started the rest of the file.
My web browser gets the whole file including the Chr and header.
LiveData.xml
_______START OF FILE_____________
☺
Content-Type:text/xml
13
1
46
9
6
2010
32.0F
32.0F
1
1
1) Print command works great
2) xml & webbasic command works great
However #3 doesn't work or I am mis-understanding the application of it.
I placed the ALT 1 in notepad as the first character.
I made the next line the Response Header I wanted
I left a blank line and then started the rest of the file.
My web browser gets the whole file including the Chr and header.
LiveData.xml
_______START OF FILE_____________
☺
Content-Type:text/xml
13
1
46
9
6
2010
32.0F
32.0F
1
1
-
YahooArchive
- Posts: 1462
- Joined: Fri Oct 19, 2012 5:11 am
Re: ARMweb serving other files types
remove the CRLF after the 0x01
I'm no XML expert
Don't you need an
and also some DTD definition
I'm no XML expert
Don't you need an
and also some DTD definition