This commit is contained in:
daniele.teti 2014-03-03 14:28:00 +00:00
parent 3ca42d0582
commit 90fe2d5f5b
2 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ type
public
[MVCHTTPMethod([httpGet])]
[MVCPath('/customers/($id).html')]
{ this route require a request header ACCEPT: text/html }
[MVCConsumes('text/html')]
[MVCProduces('text/html', 'UTF-8')]
procedure GetPerson_AsText(CTX: TWebContext);

View File

@ -280,7 +280,7 @@ begin
begin
FoundOneAttribConsumes := true;
Accept := MVCConsumesAttribute(AAttributes[i]).Value;
if Pos(AAccept, ',') > 0 then
if Pos(',', AAccept) > 0 then
AAccept := Copy(AAccept, 1, Pos(',', AAccept) - 1);
Result := SameText(AAccept, Accept, loInvariantLocale);
end;