utf-8 charset supposedly not specified

Aug 11, 2009 at 1:51 AM

I'm making a sharepoint site request, and Watcher claims that this request does not specify UTF-8. I think Watcher has a bug. See the request below. Is the check case-sensitive?

-------------

Charset not UTF-8

Risk: Informational

The response to the following request did not explicitly set the character set as UTF-8:

mysite/mine

The following issue(s) were identified:

0) Content type and/or charset not defined in meta tag.

-----------------

GET /mine HTTP/1.1
Accept: image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: en-US,ja-JP;q=0.5
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; InfoPath.3)
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
Cookie: SPSessionGuid=5ec2c666-dc30-4629-97ab-76ccafd9c205; WSS_KeepSessionAuthenticated={34883566-22f4-4b3a-a71d-7b3fd357fd9a}; http://mysite=PrevWorkbookUrl=sHDK9/JHTVyc6sdpEwowyS4wroyXFL2Rqx0ARqz2Xprjo3sC6Uko3Ea4VhTqJROgPT7kAWISAqqRotbH343kyga8+tbVIo8hx9tn9dkSLOUqrDBk/F5SmTM+zTuiyG9jE7QD1s7wFs71YApWmkvFMlK1R0kx7/lQv/9gvdpriryI2OJNEHF5k8Wh9Fc36u7WpDsTbaYemzM=&ClientPermissions=sHDK9/JHTVyc6sdpEwowyS4wroyXFL2Rqx0ARqz2Xprjo3sC6Uko3Ea4VhTqJROgPT7kAWISAqqRotbH343kyp4RH/SrWA+LMPZHKZgySvDNU0azkRpCjxgDU+CqpiHtkbygjyf4afOBsUMn8qdbTPmfOgYD24E3LAmFnhLaeEJqIYtAPjXz2nZw5X3sz2GV&cwut=http%3A%2F%mysite%3A80%2Fdavema%2Frestdemo2%2Exlsx&wfnt=restdemo2%2Exlsx&SessionId=36.e93746f7-22c0-4d9d-87f3-300d028b4f60163.1.V22.349nSHezzKhduwUmCuYMs590.5.en-US5.en-US73.+0480#0000-11-00-01T02:00:00:0000#+0000#0000-03-00-02T02:00:00:0000#-006036.3d0cee1f-41cf-43cf-911f-503394a34c551.N&FirstColumn=6&FirstRow=6&ActiveSheetName=&VisibleItemName=colorful&EWRLT=08/10/2009 23:45:55; ctl00_PlaceHolderMain_m_excelWebRenderer_ewaCtl_Ribbon.Home=1050588--1; sHDK9%2FJHTVyc6sdpEwowyS4wroyXFL2Rqx0ARqz2Xprjo3sC6Uko3Ea4VhTqJROgPT7kAWISAqqRotbH343kysra%2BVf%2ByT%2B8NMB3PRP9Ba2EssMdxgkLFXH5RQGM6dPbLqKv9gdqNtuv6svFjQRFAP59%2FibzeWEb%2Bctl00%5FPlaceHolderMain%5Fm%5FexcelWebRenderer=; Ribbon.Document=1050588-7
Authorization: NTLM TlRMTVNTUAADAAAAGAAYAH4AAADQAdABlgAAAA4ADgBYAAAADgAOAGYAAAAKAAoAdAAAAAAAAABmAgAABYKIogYBIRwAAAAP6G9DhOTtpzfzK4ZCjSKPJlIARQBEAE0ATwBOAEQAbAB1AGsAZQBzAGMAaABQAEgAQQBFAFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA08rav7Ajmr4z+WU0rDklwAEBAAAAAAAAJqnALCQaygG8zTb7CRDi2AAAAAACAA4AUgBFAEQATQBPAE4ARAABABgAWABMAFMAUgBWAFMASABBAFIARQBEADIABAA0AHIAZQBkAG0AbwBuAGQALgBjAG8AcgBwAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQADAE4AWABMAFMAUgBWAFMASABBAFIARQBEADIALgByAGUAZABtAG8AbgBkAC4AYwBvAHIAcAAuAG0AaQBjAHIAbwBzAG8AZgB0AC4AYwBvAG0ABQAkAGMAbwByAHAALgBtAGkAYwByAG8AcwBvAGYAdAAuAGMAbwBtAAcACAAmqcAsJBrKAQYABAACAAAACAAwADAAAAAAAAAAAQAAAAAgAABzac82HKxqZtpJcPpQYw4BMPltpbqTBs+sdsefxn8iAwoAEAAAAAAAAAAAAAAAAAAAAAAACQBYAEgAVABUAFAALwB4AGwAcwByAHYAcwBoAGEAcgBlAGQAMgAuAHIAZQBkAG0AbwBuAGQALgBjAG8AcgBwAC4AbQBpAGMAcgBvAHMAbwBmAHQALgBjAG8AbQAAAAAAAAAAAAAAAAA=
Host: mysite


HTTP/1.1 302 Redirect
Content-Type: text/html; charset=UTF-8
Location: http://myserver/mine/default.aspx
Server: Microsoft-IIS/7.5
SPRequestGuid: 72da95b2-376d-4e6b-b61d-2a8e2e80c7de
Set-Cookie: WSS_KeepSessionAuthenticated={34883566-22f4-4b3a-a71d-7b3fd357fd9a}; path=/
x-sharepointhealthscore: 3
Persistent-Auth: true
X-Powered-By: ASP.NET
MicrosoftSharePointTeamServices: 14.0.0.4327
Date: Tue, 11 Aug 2009 01:36:40 GMT
Content-Length: 160

<head><title>Document Moved</title></head> <body><h1>Object Moved</h1>This document may be found <a HREF="http://myserver/mine/default.aspx">here</a></body>

Coordinator
Aug 11, 2009 at 3:24 AM

Thanks for the report fancycat, Watcher is actually concerned with the response here, not the request, which you probably know.  The issue for Watcher is that while the HTTP header does include a charset definition, the HTML meta tag does not exist.  In other words, Watcher requires both a header and a body charset be defined or it will flag an issue.  However, I do consider this to be overkill, so in the next release we're going to change the requirement so that if an HTTP header does exist, Watcher won't require a meta charset to be defined also.

Most browsers these days will give priority to the HTTP header Content-Type, so if that alone is defined we should be satisfied.  If you know different please let me know.  And thanks for the feedback!

Chris

Jul 19, 2010 at 10:26 AM

You should also consider that Content-Type response header has

should not be checked for responses like 204 (No Content) and other response codes defined with no body.

 

Jul 19, 2010 at 10:43 AM

IMHO:

This response should not produce the "No charset was specified in the HTTP Content-Type header."

HTTP/1.1 204 No Content

Content-Length: 0

Content-Type: text/html

Date: Mon, 19 Jul 2010 10:37:52 GMT

Proxy-Connection: keep-alive

Server: GFE/2.0

 

Coordinator
Jul 20, 2010 at 1:36 AM
Thanks for the feedback ainthek. I'm updating Watcher to ignore any response with a Content-Length of 0. Thanks for the suggestion.